S
Seanie
I have the code below, given from this NS, which changes all negative
values to red font, but I'm getting a type mismatch error on line-
If c.Value < 0 Then
I've checked the sheet name spelling etc, but all looks ok
Sub ChangeFormatstoRed_whenNegative()
Application.ScreenUpdating = False
Sheets("Register").Activate
For Each c In ActiveSheet.UsedRange.Cells
If c.Value < 0 Then
c.NumberFormat = "#,##0.00_);[Red](#,##0.00)"
End If
Next
End Sub
values to red font, but I'm getting a type mismatch error on line-
If c.Value < 0 Then
I've checked the sheet name spelling etc, but all looks ok
Sub ChangeFormatstoRed_whenNegative()
Application.ScreenUpdating = False
Sheets("Register").Activate
For Each c In ActiveSheet.UsedRange.Cells
If c.Value < 0 Then
c.NumberFormat = "#,##0.00_);[Red](#,##0.00)"
End If
Next
End Sub