Hi,
My learning curve in vba continues. This macro shades cells if they are higher in value that left adjacent.
I would like this macro to only apply to cells with number format: custom ##,##0;-##,##0 and ignore cells displaying currency: custom: \€#,##0;-\€#,##0. Please note these cell formats derive from a old macro I did not develop and dare not touch.
Any suggestions for a solution are greatly appreciated.
Sub conditshad()
Dim i As Long
Dim ws As Worksheet
Dim c As Range
i = Cells(Cells.Rows.Count, "E").End(xlUp).Row
For Each ws In ActiveWorkbook.Worksheets
For Each c In ws.Range("D5:g" & i)
If c.Value > c.Offset(0, -1).Value Then c.Interior.ColorIndex = 4
Next c
Next ws
End Sub
Bookmarks