Does anyone know how to set a rule using conditional formatting to highlight a cell. I want to use this logic.
![]()
If(Range("A1")<>Range("B1"), Highlight Range("A1"))
Does anyone know how to set a rule using conditional formatting to highlight a cell. I want to use this logic.
![]()
If(Range("A1")<>Range("B1"), Highlight Range("A1"))
if you put
= A1 <> B1
and apply to A1 or range in column A
Select your A:A range, go to the conditional formatting button and select more rules from 'Highlight Cells Rules'. Select 'not equal to' in the second drop down box and enter a relative B1 (not $B$1) in the formula box. Set your formatting and you are done.
Thanks Matt. I think I'm close, but it highlighted the whole column regardless of whether the cell to the right was the same. Are you sure I should enter B1?
1. highlight the range you want to apply the conditional formatting to (all the cells you need to apply it to in A)
2. on the home tab, styles, select CF
3. select new rule, select use formula
4. enter =A1<>B1 format fill red this assumes that your 1st piece of data is in A1 and B1 - adjust as needed
@ matt - you need to try and avoid using entire columns in CF, it becomes very resource-intense and will slow things down, rather, restrict it to the minimum range needed
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Happy to help and thanks for the feedback![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks