+ Reply to Thread
Results 1 to 5 of 5

Conditional Formatting and referencing cell

  1. #1
    Registered User
    Join Date
    03-15-2010
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    75

    Conditional Formatting and referencing cell

    Hello all,

    I've come across a problem I'm having trouble resolving. I am trying to change the cell background color when the date in the cell is between 75 and 90 days of the current date. I've used the following code in the conditional formatting:

    =(TODAY()-$K$22>75)*AND(TODAY()-$K$22<90) and set the formatting if true to turn the cell yellow.

    K22 is a date. This code works just fine. My issue is I have MANY cells that I want to apply this Conditional Formatting to and the task of going to each and every cell to change the $K$22 to the correct cell reference is just crazy.

    I'm looking for a coding that will let me highlight all the cells I want to apply the formatting to and set it that way.

    I've tried

    =(TODAY()-cell.value>75)*AND(TODAY()-cell.value<90)

    and it didn't work. any tips on how to resolve this matter would be greatly appreciated.

    mainly I'm trying to turn the cell color yellow if the date currently held in that cell is between 75 and 90 days prior to today's date. I can do it to each cell individually, I'm just trying to save myself hours of time if there's a simple formula I can use to format all of them at once...

    any help will be appreciated.
    Last edited by SUPPO_USN; 02-26-2011 at 11:50 AM.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Conditional Formatting and referencing cell

    Have you tried using relative references in your formula?

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,375

    Re: Conditional Formatting and referencing cell

    Hi
    see the attached with an example of how it works.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    03-15-2010
    Location
    CT
    MS-Off Ver
    Excel 2010
    Posts
    75

    Re: Conditional Formatting and referencing cell

    Thanks Marvin,

    that did what I wanted it to do with a little modification. namely changing the today() +70 to today()-70 since the cell dates were in the past, but regardless, thanks. I was trying to make it too complicated on myself.

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,375

    Re: Conditional Formatting and referencing cell

    Great !!

    Conditional Formatting and Validation rules always take me a few Trial and Error turn-a-rounds before they work.

    Glad you understood and made it work for you.

+ 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