Vlookup formula

Mux99

Board Regular
Joined
Apr 15, 2019
Messages
57
I'm currently using the following formula in conditional formatting:

=VLOOKUP($A1,$1:$1048576,COLUMN(),0)="MATCH"

The formula is only working if the word "MATCH" is in the row where the name in Column A is listed first. All six cells with data in the example below would need to be highlighted, but with the current formula only C2 & C4 are highlighted.

ABCD
1Name1HIGHLIGHTHIGHLIGHT
2Name2MATCH
3Name1MATCHMATCH
4Name2HIGHLIGHT

Thanks
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Select the whole cells and then add that formula to conditional formatting.

Formula is applied to =$1:$1048576 but only works in rows where the name in column A is listed for the first time.

In the example above "MATCH" in row 3 is not recognized as the Name is already listed in row 1. B1 & B3 and D1 & D3 should also be highlighted.
 
Upvote 0
it is working well on my side and don't see any issue.
tmp.JPG
 
Upvote 0
I'll try to explain myself a little better as the formula is not working as I need it to.

I need to search through Column A and highlight all cells from column B onwards in the same column with the same name if it contains the word "MATCH".
Ex. C2 = MATCH so both C2 & C4 should be highlighted since they have the same name in Column A. (This currently works with my formula)

With my example B1 & B3 and D1 & D3 should all be highlighted as they all have the same name in Column A. This isn't currently working as it's only recognizing the first Name listed.
 
Upvote 0
How about
+Fluff New.xlsm
ABCD
1Name1HIGHLIGHTHIGHLIGHT
2Name2MATCH
3Name1MATCHMATCH
4Name2HIGHLIGHT
Data
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B1:D4Expression=COUNTIFS($A:$A,$A1,B:B,"MATCH")>0textNO
 
Upvote 0
How about
+Fluff New.xlsm
ABCD
1Name1HIGHLIGHTHIGHLIGHT
2Name2MATCH
3Name1MATCHMATCH
4Name2HIGHLIGHT
Data
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B1:D4Expression=COUNTIFS($A:$A,$A1,B:B,"MATCH")>0textNO

Thanks, this works but it's very slow. Each time new data is entered it loads for around 3-4 seconds.

Is there any other way this can be done?
 
Upvote 0
What range have you applied the CF to?
 
Upvote 0
Conditional formatting is volatile, so running it on that amount of cells is not a good idea.
You would probably be better off with a macro, although that would not update automatically.
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top