Simple Conditional Formats using VLOOKUP

BrooksTech

Board Regular
Joined
May 9, 2011
Messages
59
I can do complex spreadsheets but never seem to get the syntax right on conditional formats, especially when it includes a vlookup:

Skipping straight to Manage Conditional Formats "IF" statement:

1. I need to say IF the value in A2 = (any value found in Array in Sheet2 column B) then format RED, else leave alone.

2. I need to do a separate one where its THREE options, IF $B2>=0 but $B2<=5 then format ORANGE, if $B2<0 format RED, otherwise leave alone.

Im familiar with how to construct the logic, but formatting likes the syntax a little differently and thats what Im not getting.
 
Last edited:

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
To colour the values in SheetName 2 if they match value in A2 in SheetName 1

Select whole of column B in Sheet2 \ click Home Tab \ Condtional formatting \ New Rule \ Use formula... \ FORMULA: =B1='SheetName 1'!$A$2


Excel 2016 (Windows) 32 bit
A
B
1
2
Title2
3
Sheet: SheetName 1

Excel 2016 (Windows) 32 bit
A
B
C
1
BookChapter Name
2
Book 001Title1
3
Book 002Title2
4
Book 003Title2
5
Book 004Title1
6
Book 005Title2
7
Book 006Title1
8
Book 007Title1
9
Book 008Title2
10
Book 009Title2
11
Book 010Title3
12
Book 011Title3
13
Book 012Title3
14
Sheet: SheetName 2
 
Upvote 0
To colour A2 in SheetName 1 if value found anywhere in column B in SheetName 2

Select A2 in Sheet1 \ click Home Tab \ Condtional formatting \ New Rule \ Use formula... \ FORMULA: =COUNTIF('SheetName 2'!$B:$B,$A$2)>1


Note
If A2 is in the same sheet as column B then remove reference to sheet in both posts #2 and #3
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,829
Messages
6,121,827
Members
449,051
Latest member
excelquestion515

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