G
Gerben
Hello,
I have a problem marking cells on a worksheet,
the macro I made should colour the cell if it is empty or has a valu
1.
It only works for the cells that contain value 1, not for the empt
ones.
Probably it has to do with the fact that the all cells (including th
empty ones) are copied from other sheets,
and are not really seen as empty by the macro.
Here the Macro:
counter = 1
While counter <= 5
counter2 = 1
While counter2 <= 542
If ActiveCell = " " Then
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
End If
If ActiveCell.Value <= 1 Then
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
End If
counter2 = counter2 + 1
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
Wend
counter = counter + 1
ActiveCell.Offset(rowOffset:=-542, columnOffset:=1).Activate
Wend
Can anybody help me with this issue?
Thanks in advance,
Gerbe
I have a problem marking cells on a worksheet,
the macro I made should colour the cell if it is empty or has a valu
1.
It only works for the cells that contain value 1, not for the empt
ones.
Probably it has to do with the fact that the all cells (including th
empty ones) are copied from other sheets,
and are not really seen as empty by the macro.
Here the Macro:
counter = 1
While counter <= 5
counter2 = 1
While counter2 <= 542
If ActiveCell = " " Then
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
End If
If ActiveCell.Value <= 1 Then
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
End If
counter2 = counter2 + 1
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
Wend
counter = counter + 1
ActiveCell.Offset(rowOffset:=-542, columnOffset:=1).Activate
Wend
Can anybody help me with this issue?
Thanks in advance,
Gerbe