[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 404
  • Last Modified:

Conditional Formatting with VLOOKUP

I am using VLookup to pull values in from one Excel tab to another. I want to make the cell change color if the user manually types in a value to replace the VLOOKUP value. So, for example, if the user goes into Cell B2 on the tab with the VLOOKUP value of "Joe" and types in "Jack" instead, I want the cell to change color so the user can see what they have changed.

I've tried this as a conditional formatting test: ="VLOOKUP(A2,SEG_D1!A:B,2,FALSE)<>B2"

The first part yields the original value and is the formula in Cell B2. If the user types over this value and puts something else in there than what the VLOOKUP yields, I want the cell to change color. Looks to me like the above would apply the test between what the VLOOKUP is yielding and what is actually in Cell B2. But when I change the value in B2 manually, it doesn't change color.

Any suggestions appreciated.

Thanks.
0
Buck_Beasom
Asked:
Buck_Beasom
  • 2
  • 2
1 Solution
 
Ejgil HedegaardCommented:
You can't reference another sheet in a conditional format formula.

But with a named range it is possible.
Name columns A:B on the sheet SEG_D1 LookupRange
Then use the name in the Vlookup formula like this =VLOOKUP(A2,LookupRange,2,FALSE)<>B2
0
 
Buck_BeasomAuthor Commented:
Seems like it should work. I named the range "RPTID" in the SEG_D1 tab and the VLOOKUP works, but when I put this into the conditional format:

="VLOOKUP(A2,RPTID,2,FALSE)<>B2"

It still doesn't change color when I change the B2 value.

Thanks.
0
 
Ejgil HedegaardCommented:
You must remove the 2 " in the formula.
="VLOOKUP(A2,RPTID,2,FALSE)<>B2" means equal to the text.
=VLOOKUP(A2,RPTID,2,FALSE)<>B2 is a formula.
0
 
Buck_BeasomAuthor Commented:
Awesome! That's got it! THANKS!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now