Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

How to use VLookup and Conditional Formatting

0

I have an excel spreadsheet that has many tabs. On one of the tabs I have laptop asset numbers listed. I have inserted another sheet in the same document and I want to show if a laptop asset number is entered onto the new sheet that matches the information I already have on the other tab that it shows up green to show a match and red if it doesn't match the information that I have on the other tab.

Please help!

Answer
Discuss

Answers

0

You need to use a VLOOKUP function inside a formula like this:

=NOT(ISNA(VLOOKUP(A1,Sheet2!$A$1:$A$4,1,FALSE)))

It's just a regular Vlookup inside a ISNA() and NOT() function so it will return TRUE or FALSE as needed.

Then select the cell or cells where you want the color to change and go to the Home tab > click the Conditional Formatting button and go to New Rule > go to Use a formula... > input the above formula and click the Format button to choose the desired green background color.

Format the cells with a red background by default and the conditional formatting will take care of making them green if you follow the steps above.

Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login