unknownymous
Board Regular
- Joined
- Sep 19, 2017
- Messages
- 249
- Office Version
- 2016
- Platform
- Windows
Hi Gurus
I found below code for changing the negative number in red.
= = = = =
Sub One_Way()
Dim c As Range
For Each c In Selection
If c.Value < 0 Then c.Font.Color = vbRed
Next c
End Sub
Source: VBA code to make negative numbers red and positive numbers black
= = = = =
However, what I have below criteria:
Sheets to Check:
Sheet 1 = Columns X to Z (Header is in Row 2)
Sheet 5 = Columns F & R-S (Header is in Row 2)
1. If Number is Less than 0, font color will be RGB(204, 0, 153)
2. If Number is Greater than 0, font color will be RGB(0, 102, 255)
3. If Number is Greater than 0, font color will be RGB(0, 0, 0)
Appreciate the help.
I found below code for changing the negative number in red.
= = = = =
Sub One_Way()
Dim c As Range
For Each c In Selection
If c.Value < 0 Then c.Font.Color = vbRed
Next c
End Sub
Source: VBA code to make negative numbers red and positive numbers black
= = = = =
However, what I have below criteria:
Sheets to Check:
Sheet 1 = Columns X to Z (Header is in Row 2)
Sheet 5 = Columns F & R-S (Header is in Row 2)
1. If Number is Less than 0, font color will be RGB(204, 0, 153)
2. If Number is Greater than 0, font color will be RGB(0, 102, 255)
3. If Number is Greater than 0, font color will be RGB(0, 0, 0)
Appreciate the help.