Milky
Milky

Reputation: 99

Google Spreadsheets vlookup in conditional formatting

I need to highlight some values in a given range to match a label returned from a vlookup function, like this: VLOOKUP(ADDRESS(ROW();COL();4);INDIRECT("<sheet>!A:D");4;0)="<label>".

I've already checked the ranges and I've tested the function in a stand-alone cell (and it worked); however it doesn't seem to work on the conditional formatting tool.

Upvotes: 1

Views: 1631

Answers (1)

PatrickdC
PatrickdC

Reputation: 2387

I have tested the function you have provided. It worked when I expanded the range under "Apply to Range". I made the following test case just to be sure:

setup1

With the following Conditional Format Rules setup & modified function:

=VLOOKUP(ADDRESS(ROW(),COLUMN(),4),INDIRECT("Test!A:D"),4,0)="testLabel1"

setup2

I used the range A:D in this test case just to test out the function.

Upvotes: 1

Related Questions