My macro steps through a table, the last step is to colour the row based on some criteria.
At the moment it uses
However this is excessive and I would like it only to colour the rows A to N
I modified the code to
but this gives an application defined or object defines error.
I think my "product" is a range, Am I wrong?
At the moment it uses
Code:
For Each product in Range
...
If product.Offset(, 15).Value < 0 Then
With product[B].[COLOR=#ff0000]EntireRow[/COLOR][/B].Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent2
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
However this is excessive and I would like it only to colour the rows A to N
I modified the code to
Code:
For Each product in Range
...
If product.Offset(, 15).Value < 0 Then
With product[COLOR=#ff0000][B].resize(0,14)[/B][/COLOR].Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent2
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
but this gives an application defined or object defines error.
I think my "product" is a range, Am I wrong?
Last edited: