0
votes

There is a table of values in sheet 1 which I want to conditionally format(Highlight the cells in color if the nested value finds a match in the table of sheet 2).

But it seems like vlookup function couldn't be used in combination with conditional formatting.

When I put in the formula for format rules(I choose "Custom formula is"),it doesn't work.

Here is the formula I use.

Custom formula is "B1=vlookup(B1,Sheet2!$A$1:$A$6,1,false)"

Is there anything wrong here in this step? Can Vlookup function be used with conditional formatting?

A range of cells which I want to conditionally format

A column of values for looking up

Vlookup function used with indirect function

1
share a copy of your sheet & formulaplayer0

1 Answers

2
votes

There is nothing basically wrong with the formula, except that when the lookup list is in another sheet, you have to use Indirect like this:

=B2=vlookup(B2,indirect("Sheet2!$A$1:$A$6"),1,0)

enter image description here