+ Reply to Thread
Results 1 to 5 of 5

Flagging vlookup results based on which argument it came from

Hybrid View

  1. #1
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,379

    Re: Flagging vlookup results based on which argument it came from

    Conditional formatting cannot "see" inside of the execution of a function like this. A couple of approaches:

    1) Include something in the output of the function that will indicate which table it came from. Maybe something like =IFERROR(IFERROR("a"&VLOOKUP(C2,'New Held Batches Sheet'!$C$5:$D$5,2,0),IFERROR("b"&VLOOKUP(C2,'New Held Batches Sheet'!$C$8:$D$22,2,0),"c"&VLOOKUP(C2,'New Held Batches Sheet'!$C$25:$D$35,2,0))),""). If you still need the conditional formatting, then you can have your conditional formatting check for the leading character (a, b, or c) and format accordingly. The main thing I don't like about this approach is that it adds a piece of information to the result, which could cause difficulties for other formulas that need this result.

    2) (My personal favorite) Use helper cells to return the result from each lookup. cell1 =VLOOKUP(C2,'New Held Batches Sheet'!$C$5:$D$5,2,0) cell2 =VLOOKUP(C2,'New Held Batches Sheet'!$C$8:$D$22,2,0) cell3 =VLOOKUP(C2,'New Held Batches Sheet'!$C$25:$D$35,2,0). Then a 4th cell could look at those three and return the value from the cell that is not N/A, and your conditional formatting could look at those three cells and format according to which one is not N/A.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  2. #2
    Registered User
    Join Date
    07-09-2013
    Location
    Oshawa, Canada
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Flagging vlookup results based on which argument it came from

    Thank you for the great ideas - I think your #1 idea shorty is what will work best for me. I just need a way of personally knowing where the data came from - the formatting is unimportant.
    If anyone has helped - Add Reputation

+ 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. vlookup based on two results
    By Skumby in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-30-2016, 02:21 AM
  2. Flagging Overdue date based on two fields
    By tomb242 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-19-2015, 12:11 PM
  3. Using vLookup based on results from a vLookup & returning an undetermined list
    By NormalityBan in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 08-14-2014, 05:02 AM
  4. Flagging different product based on 1 range
    By mmmarshman in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-25-2013, 12:52 PM
  5. Replies: 3
    Last Post: 07-16-2011, 11:33 AM
  6. Flagging Duplicates based on Multiple conditions
    By e4excel in forum Excel Formulas & Functions
    Replies: 28
    Last Post: 11-25-2008, 09:09 PM
  7. [SOLVED] Conditional Sum Argument results do not equal cell results Excel
    By Randy R Mullins in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-09-2006, 02:19 PM

Tags for this Thread

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