VBA Code - conditional formatting
Closed
SridharK
-
Updated on Aug 2, 2018 at 11:20 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jul 19, 2018 at 11:25 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jul 19, 2018 at 11:25 AM
Related:
- VBA Code - conditional formatting
- Battery reset code - Guide
- Samsung volume increase code - Guide
- How to get whatsapp verification code online - Guide
- Vba case like - Guide
- Cs 1.6 code - Guide
2 responses
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Jul 17, 2018 at 11:32 AM
Jul 17, 2018 at 11:32 AM
Hi SridharK,
Why use VBA for this, but if you "must", then use the macro recorder to see how it is done.
Best regards,
Trowa
Why use VBA for this, but if you "must", then use the macro recorder to see how it is done.
Best regards,
Trowa
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Jul 19, 2018 at 11:25 AM
Jul 19, 2018 at 11:25 AM
Hi SK,
It seems that the macro recorder doesn't record much in this case.
Give this code a try:
Best regards,
Trowa
It seems that the macro recorder doesn't record much in this case.
Give this code a try:
Sub RunMe() For Each cell In Range("A:A") If cell.Value <> vbNullString Then Select Case cell.Value Case Is < 25 cell.Interior.Color = 13551615 cell.Font.Color = -16383844 Case 26 To 35 cell.Interior.Color = 10284031 cell.Font.Color = -16751204 Case Is > 35 cell.Interior.Color = 13561798 cell.Font.Color = -16752384 End Select End If Next cell End Sub
Best regards,
Trowa