Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Conditional Formatting day!! (2003 SP2)

    Evening all

    I have a range of public/bank holidays SetUp!AC42:AC129 in 12 other sheets I would like to colour the cells to match any dates in the range, for example D5 through AH5 are date formatted in my January worksheet with D5 showing Thu which is Jan 1st New years day, how can I get the conditional formatting into D6:AH6 and then all of the following cells

    Cheers

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Conditional Formatting day!! (2003 SP2)

    You need to name the range SetUp!AC42:AC129 - let's call it Holidays. Then you can select D5:AH5, Format->Conditional Formatting, Formula Is, and enter:
    =COUNTIF(Holidays,D5)>0
    and choose your formatting.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Formatting day!! (2003 SP2)

    Hi Rory

    Thanks that worked great, for any other people trying this I had to put a $ between the D and 5, D$5 to make it work across the complete month as Hans as demonstrated in an earlier post.

    Cheers

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  4. #4
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Formatting day!! (2003 SP2)

    Thanks to Rory's suggestion this is working OK, however within the conditional formatting code can I have letters inserted into the cells, for example PH for public holiday, this is what I currently have based on Rory's advice

    =COUNTIF(PublicHolidays,D$5)>0

    Cheers

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Conditional Formatting day!! (2003 SP2)

    Conditional formatting, as the name implies, only changes the formatting of a cell (text colour, background color and border colour), not the value displayed in the cell. So you cannot use conditional formatting to insert the text "PH" in a cell. You'd have to enter it manually, or write a macro to do so - I assume that public holidays don't change on the fly, so you'd have to do this only once.

  6. #6
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Conditional Formatting day!! (2003 SP2)

    Thanks Hans

    I did suspect that this would be the case

    Cheers

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

Posting Permissions

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