+ Reply to Thread
Results 1 to 8 of 8

Conditional format a cell result from Vlookup not working

  1. #1
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Conditional format a cell result from Vlookup not working

    I have a vlookup formula in cell G39, which looks up a value on another worksheet, =IF(ISNA(VLOOKUP($G$29,B620_CPS,6,)),"",VLOOKUP($G$29,B620_CPS,6,)). Then in cell G27 I have a word which I want to turn red if this condition is met, =G39>"1999". But it does not work. Any ideas how to make this work.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Conditional format a cell result from Vlookup not working

    Try =G39>1999

    this works OK if G39 is a number. Have to check what happens if it's text.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Conditional format a cell result from Vlookup not working

    What's in G39?

    Specifically is it a text or number. Test with =ISNUMBER(G39)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Conditional format a cell result from Vlookup not working

    If it's text, it doesn't work - so you'd need to ensure that it returns the number as a number... add zero to the output of the lookup..

  5. #5
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: Conditional format a cell result from Vlookup not working

    Thanks Glenn and Richard for the replies! The cell is formatted as "general" and returns a year. I tried it without quotes and that seems to be the answer. Thanks!

  6. #6
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: Conditional format a cell result from Vlookup not working

    Well, I thought it worked! Tried it again and it didn't, but I found this formula in another thread, tried it and seems to work. =(VALUE(G39)>1999)

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Conditional format a cell result from Vlookup not working

    That's was I was getting at in Post 4. If it's text that looks like a number, you need to make excel think its a number. You can do that, for example< by adding 0 to the output of the VLOOKUP (changing it in G39 from text to number). The VALUE function does the same, but in the conditional formatting equation. Different route to the same result.

  8. #8
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: Conditional format a cell result from Vlookup not working

    Thanks Glenn. Odd though as the format of cell G39 is general and so is the source data. I am not clear how to add this zero to =IF(ISNA(VLOOKUP($G$29,B620_CPS,6,)),"",VLOOKUP($G$29,B620_CPS,6,)) or to what? Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 9
    Last Post: 01-15-2014, 07:59 PM
  2. Conditional Format a Cell with a #N/A result
    By nappy1001 in forum Excel General
    Replies: 6
    Last Post: 12-10-2013, 09:27 PM
  3. [SOLVED] Conditional format a cell based on a result of a formula in another cell
    By Taiter in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-20-2013, 04:45 PM
  4. [SOLVED] Conditional format a cell based on a result of a formula in another cell
    By Taiter in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-20-2013, 01:47 PM
  5. Replies: 5
    Last Post: 06-10-2013, 07:01 AM

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