Hi,
I need to check Columns B to F with Columns I to M and if there is difference highlight both the cell. Can anyone help me to find a solution.
Regards,
Hi,
I need to check Columns B to F with Columns I to M and if there is difference highlight both the cell. Can anyone help me to find a solution.
Regards,
You can use Conditional Formatting with two rules
Conditional Formatting
- Highlight applicable range >> $B$9:$F$116
- Home Tab >> Styles >> Conditional Formatting >> New Rule
- Select a Rule Type: Use a formula to determine which cells to format
- Edit the Rule Description: Format values where this formula is true: =B9<>I9
- Format… [Number, Font, Border, Fill] Select Fill >> Red
- OK >> OK
- Highlight applicable range >> $I$9:$M$116
- Home Tab >> Styles >> Conditional Formatting >> New Rule
- Select a Rule Type: Use a formula to determine which cells to format
- Edit the Rule Description: Format values where this formula is true: =I9<>B9
- Format… [Number, Font, Border, Fill] Select Fill >> Red
- OK >> OK
Last edited by jeffreybrown; 05-29-2017 at 08:56 AM.
HTH
Regards, Jeff
Hi,
thanks, the data provided is just a sample, the original data exceeds more than 10 k. I would prefer a vba solution.
Try...
![]()
Sub ApplyCF() Dim wsSrc As Worksheet: Set wsSrc = Sheets("Reconciliation_Summary") Dim LastRow As Long: LastRow = wsSrc.Range("A" & Rows.Count).End(xlUp).Row Const Fm1$ = "=B9<>I9" Const Fm2$ = "=I9<>B9" Const CellColor = 9 Const FontColor = 2 Application.ScreenUpdating = False With wsSrc.Cells With .FormatConditions .Delete End With End With wsSrc.Range("B9").Select With wsSrc.Range("B9:F" & LastRow) With .FormatConditions With .Add(Type:=xlExpression, Formula1:=Fm1) .Interior.ColorIndex = CellColor .Font.ColorIndex = FontColor End With End With End With wsSrc.Range("I9").Select With wsSrc.Range("I9:M" & LastRow) With .FormatConditions With .Add(Type:=xlExpression, Formula1:=Fm2) .Interior.ColorIndex = CellColor .Font.ColorIndex = FontColor End With End With End With Application.ScreenUpdating = True End Sub
Last edited by jeffreybrown; 05-29-2017 at 10:24 AM.
jeffreybrown,
Thanks for the code, I will check and get back to you tomorrow. I am out of office.
Last edited by jeffreybrown; 05-29-2017 at 11:06 AM. Reason: Removed full quote as it's just clutter
Thanks Jeffrey, I have checked the code and it's exactly what I expected.
You are very welcome. Happy to help.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks