+ Reply to Thread
Results 1 to 12 of 12

Conditional formatting with lookup formula?

Hybrid View

  1. #1
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Conditional formatting with lookup formula?

    So as long as the last year is in 2011 or later, it's valid?

    Perhaps try formula:

    =IF($A2="","",IF(AND($I2=MAX(IF($A$2:$A$100=$A2,$I$2:$I$100)),YEAR(MAX(IF($A$2:$A$100=$A2,$I$2:$I$100)))>=2011),"Valid",IF(YEAR(MAX(IF($A$2:$A$100=$A2,$I$2:$I$100)))<2011,"Expired","")))
    adjust ranges to suit... I guessed you are looking at column I for dates.. and also only went to row 100..

    Then confirm the formula with cTRL+SHIFT+ENTER not just ENTER and copy down.

    You can then set conditional formatting to see if Cell Value is ="Valid", turn Green, and one for if Cell Value is ="Expired", turn Red.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  2. #2
    Registered User
    Join Date
    07-24-2011
    Location
    belfast
    MS-Off Ver
    office 365
    Posts
    61

    Re: Conditional formatting with lookup formula?

    Many thanks for your formula..... can you explain this in a little more detail as I am trying to understand the concept......

  3. #3
    Registered User
    Join Date
    07-24-2011
    Location
    belfast
    MS-Off Ver
    office 365
    Posts
    61

    Re: Conditional formatting with lookup formula?

    I have tried your formula and found that there is an issue (maybe my mistake!) only made the following change and that was to take the range a2:a1500 and also I2: I1500

    on some training carried out 19 nov 07 valid 5 years expiry date is 18 nov 2012..... using your formula it comes up as expired and this clearly isnt the case. What have I done wrong?

+ 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