+ Reply to Thread
Results 1 to 9 of 9

create border across entire row based on current week

  1. #1
    Registered User
    Join Date
    01-13-2008
    Posts
    10

    create border across entire row based on current week

    i have a table with dates running down one column and i find it hard to keep track of which week or row i am in, as there is a lot of data to look at. i would like to be able to put the start date of a given week into a cell, and for that row to throw up a thick black border. the dates in the column relate to the start date of that week.

    eg:


    date = 21/01/08


    07/01/08
    14/01/08
    ===============================
    21/01/08
    ===============================
    28/01/08
    04/02/08


    and then of course to undo the border when the date is changed.


    i'd appreciate any help, cheers
    Using Office 2008 for MAC OS, NO VB SUGGESTIONS PLEASE, IT IS UNSUPPORTED!

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    I think this is what you need :http://www.contextures.com/xlCondFormat02.html

  3. #3
    Registered User
    Join Date
    01-13-2008
    Posts
    10
    thanks for the reply, its a step in the right direction. but i am completely new to excel so i don't know how to set the formula correctly to apply the formatting. i am googling around for more info on 'TODAY' and 'NOW' functions after looking at the link you suggested so thanks for that.

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    today() will give you today's date
    now() the same + the time
    And if you're not familiar with the way XL uses dates and times, here is a good link :
    http://www.mvps.org/dmcritchie/excel....htm#firstdate

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    If you know you will be entering a date every Monday, and you want the line either above or below it (or cell colored), highlight your column (I assumed column A beginning with row 1) where your dates are and go to conditional formatting, chose "Formula is" and
    Please Login or Register  to view this content.
    Chose your border formatting as required. If it might be either a Monday or Tuesday, try (starting in A2)
    Please Login or Register  to view this content.
    The function WEEKDAY(DATE) returns a 1 for Sunday, 2, for Monday, etc.

    Let us know if that works for you.

    ChemistB

  6. #6
    Registered User
    Join Date
    01-13-2008
    Posts
    10
    arthurbr:

    thanks for the link, it looks like a lot to look at so i'll probably take some time to go through it

    chemistb:

    i tried your first formula editing 'A1' to 'A13' in my case, and it put the correct format over every cell highlighted, but only one column across. in my workbook, i created the list of dates like this:

    Please Login or Register  to view this content.

    which gives me:

    A13 07-Jan-08
    A14 14-Jan-08
    A15 21-Jan-08
    A16 28-Jan-08
    A17 4-Feb-08
    ......etc



    i'm guessing your formula means 'if the date in this cell is a monday, apply the conditional format' (which every cell is, hence every cell getting formatted), what i was after was 'if today's date is within the week that starts on this date, apply the format'. sorry if i wasn't explaining myself properly, its all new to me. i'm think what i want would follow something like this (please excuse my guessing on terminology and syntax)


    IF, TODAY, EQUALS, CONTENT OF CELL+(0:6), APPLY FORMULA, TO A(row number) THROUGH TO Z(row number)


    thanks for the reply tho, i appreciate the help - even if its not what i wanted i have learnt something

  7. #7
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    523
    The following might be of help:
    My assumptions:

    You enter the start date of the week you are now working on in cell A1 (intending that the matching date in your column of dates will be highlighted in a particular way).

    Your "start of week dates" are in cells A3, A4, A5 etc

    Steps:

    1. Enter a relevant date in cell A1.
    2. Click on cell A3. Click the Formatting | Conditional formatting menu. A dialog box will be displayed, showing "Cell value is" in the first field.
    3. Set the second field to "equal to"
    4. Set the next field to "$A$1" (without typing the "").
    5. Click the "Format... " button on the dialog box. Another dialog box will be displayed.
    6. Click the Patterns tab to display a set of colours. Click any of the colours - this is the colour the relevant cell will be highlighted in. Press OK and Ok again to exit the dialog box.
    7. Click the 'Format painter' (like a paintbrush on the formatting toolbar.
    8. Click and drag from cell A4 down to the other date cells.

    That should work.
    Last edited by deadlyduck; 01-18-2008 at 11:55 AM.

  8. #8
    Registered User
    Join Date
    01-13-2008
    Posts
    10
    it doesn't seem to work but i am pretty sure its because the "A1" field in your example is "14/01/2008", and the "A2" is "14-Jan-08", so it is not equal. i will have to change some things to make it match and make sure it doesn't affect anything else. thanks very much for the help tho, i will try again with it after i sort things out

  9. #9
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Quote Originally Posted by sentofuno
    it doesn't seem to work but i am pretty sure its because the "A1" field in your example is "14/01/2008", and the "A2" is "14-Jan-08", so it is not equal. i will have to change some things to make it match and make sure it doesn't affect anything else. thanks very much for the help tho, i will try again with it after i sort things out
    As far as I know, "14/01/2008", and "14-Jan-08", are exactly the same to XL.
    This being said, maybe that one of the two is formatted as text, which would cause a problem

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1