+ Reply to Thread
Results 1 to 7 of 7

Conditional Formatting based on VLOOKUP - Issue with Blanks

  1. #1
    Registered User
    Join Date
    04-24-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    22

    Conditional Formatting based on VLOOKUP - Issue with Blanks

    Hi,

    I have an issue with conditional formatting based on a vlookup and not equal to. It works fine until the cell in which the conditional formatting is applied is blank and the cell that is being vlookup'd is also blank. In these instances, the conditional formatting is highlighting these as being not equal to each other also. However, if I double-click on the cells with conditional formatting applied as though I was going to enter text but then press return without entering anything the conditional formatting corrects it self and no longer highlights the cell.

    Hopefully the above makes sense and someone can help.

    Cheers,
    Hozcat

  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,116

    Re: Conditional Formatting based on VLOOKUP - Issue with Blanks

    Hi there.

    A picture is worth 1,000 words. An Excel sheet is worth 1,000 pictures.

    Please read the yellow banner about sample worksheets, at the top of the screen. Act on its guidelines and post a SMALL sample sheet.
    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

  3. #3
    Registered User
    Join Date
    04-24-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Conditional Formatting based on VLOOKUP - Issue with Blanks

    Point taken Glenn. Now with attachment - Thanks.

    Table 1 has conditional formatting applied based on the values not being equal to the values in Table 2 (based on VLOOKUP). As can be seen, cells C4, D4 & E4 have the correct formatting applied but cells D3 & E3 are flagging as not being equal to also but the values match (both cells are blank)

    Cheers,
    Hozcat
    Attached Files Attached Files

  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,116

    Re: Conditional Formatting based on VLOOKUP - Issue with Blanks

    I'm not 100% sure what you expoect to see, but:

    =AND(NOT(ISBLANK(J3)),A3=J3)
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-24-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Conditional Formatting based on VLOOKUP - Issue with Blanks

    Thanks. What I am trying to achieve is to flag differences between the two tables that have the same column headers, however, in the raw data Table1 could have 100 rows whereas Table2 could have 1000, which is why I was trying to use the vlookup function.

    Using the =AND(NOT(ISBLANK(J3)),A3=J3) to flag the inverse does not highlight that cells D3 & E3 match the values in M3 & N3 so even if the table sizes were the same in the raw data this wouldn't highlight all of the differences.

    Cheers,
    Hozcat

  6. #6
    Registered User
    Join Date
    04-24-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Conditional Formatting based on VLOOKUP - Issue with Blanks

    I think the issue with the blanks is related to the format of the data being different in Tables 1 & 2 (but I can't work out what). If I paste special the values from cells D3 & E3 into M3 & N3, the conditional formatting corrects itself to show what I was expecting to see.

    Cheers,
    Hozcat

  7. #7
    Registered User
    Join Date
    04-24-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Conditional Formatting based on VLOOKUP - Issue with Blanks

    Have sussed this. For anybody that runs into similar problems in the future, the issue is being caused because I have used the TRIM function on the data in Table1 but not in Table2....

    Cheers

+ 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. [SOLVED] conditional formatting based on a divisible factor minus 1 and age populated by bday issue
    By TravisD76 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-29-2019, 01:35 AM
  2. [SOLVED] Conditional formatting based on vlookup returning any value
    By Nina579 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-23-2016, 08:21 PM
  3. conditional formatting based on text & blanks
    By firroo in forum Excel General
    Replies: 5
    Last Post: 12-27-2015, 04:00 AM
  4. [SOLVED] Expert Needed: Conditional Formatting and SumIF/VlookUp issue (Last row)
    By newtotheblock in forum Excel General
    Replies: 4
    Last Post: 01-09-2015, 10:06 PM
  5. [SOLVED] Conditional Formatting based on a Formula VBA Issue
    By lashellr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-10-2014, 11:58 AM
  6. [SOLVED] Conditional Formatting based on Vlookup
    By lanos in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-24-2012, 10:33 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