lucsar
07-11-2011, 08:12 AM
Hi all,
I would like to color multi cells on a row at once without to repeat for each:
Dim Xcell As Range
For Each Xcell In Range("L8:R100")
If Cells(Xcell.Row, 15).Value = "x" Then
Cells(Xcell.Row, 33).Interior.ColorIndex = 3
Cells(Xcell.Row, 34).Interior.ColorIndex = 3
Cells(Xcell.Row, 35).Interior.ColorIndex = 3
Cells(Xcell.Row, 36).Interior.ColorIndex = 3
...
Thanks!
Luca
I would like to color multi cells on a row at once without to repeat for each:
Dim Xcell As Range
For Each Xcell In Range("L8:R100")
If Cells(Xcell.Row, 15).Value = "x" Then
Cells(Xcell.Row, 33).Interior.ColorIndex = 3
Cells(Xcell.Row, 34).Interior.ColorIndex = 3
Cells(Xcell.Row, 35).Interior.ColorIndex = 3
Cells(Xcell.Row, 36).Interior.ColorIndex = 3
...
Thanks!
Luca