Excel Tutorials | Formatting macros Codes

Highlight Unique Values

Sub highlightUniqueValues() Dim rng As Range Set rng = Selection rng.FormatConditions.Delete Dim uv As UniqueValues Set uv = rng.FormatConditions.AddUniqueValues uv.DupeUnique = xlUnique uv.Interior.Color = vbGreen

Read More »

Highlight Difference in Columns

Sub columnDifference() Range(“H7:H8,I7:I8”).Select Selection.ColumnDifferences(ActiveCell).Select Selection.Style= “Bad” End Sub Using this code you can highlight the difference between two columns (corresponding cells).

Read More »

Highlight Difference in Rows

Sub rowDifference() Range(“H7:H8,I7:I8”).Select Selection.RowDifferences(ActiveCell).Select Selection.Style= “Bad” End Sub You can Highlight Difference in Rows (corresponding cells) by using this VBA Macro Code in Excel

Read More »