Hi guys,
I have a table range ("C3:BO12") in 25 worksheets in one book. I would like to do is color interior green if value is =>0 and red if <0 in each worksheet.
Would this work. Not at computer cos it's broken but been playing on my mind.
Sub condition
Dim ws As worksheet
Dim cell as range
For each ws in Activeworkbook.worksheet
For each cell in range("C3:BO12")
If cell.value =>0 Then
Cell.interior.color = vbGreen
ElseIf cell.value < 0 Then
Cell.interior.color = vbRed
EndIf
Next cell
Next ws
End Sub
I have a table range ("C3:BO12") in 25 worksheets in one book. I would like to do is color interior green if value is =>0 and red if <0 in each worksheet.
Would this work. Not at computer cos it's broken but been playing on my mind.
Sub condition
Dim ws As worksheet
Dim cell as range
For each ws in Activeworkbook.worksheet
For each cell in range("C3:BO12")
If cell.value =>0 Then
Cell.interior.color = vbGreen
ElseIf cell.value < 0 Then
Cell.interior.color = vbRed
EndIf
Next cell
Next ws
End Sub