coliervile
Well-known Member
- Joined
- May 19, 2006
- Messages
- 724
I'm using the following macro to color a range of cells:
Private Sub CellColor()
Range("A1:J19").Select
With Selection.Interior
.ColorIndex = 1
End With
End Sub
and the following formula to count the cells with the color index of "1" in a range:
=SUMPRODUCT(--(ColorIndex(J1:J19)=1))
but I'm getting an error #NAME? (Formula contains unrecognized text) and can't figure out why??? I wouild appreciate your help.
Best regards,
Charlie
Private Sub CellColor()
Range("A1:J19").Select
With Selection.Interior
.ColorIndex = 1
End With
End Sub
and the following formula to count the cells with the color index of "1" in a range:
=SUMPRODUCT(--(ColorIndex(J1:J19)=1))
but I'm getting an error #NAME? (Formula contains unrecognized text) and can't figure out why??? I wouild appreciate your help.
Best regards,
Charlie