Conditional Formatting in Excel2010
Solved/Closed
pjevans
Posts
1
Registration date
Friday July 26, 2013
Status
Member
Last seen
July 27, 2013
-
Jul 27, 2013 at 12:07 AM
Peter - Jul 30, 2013 at 05:55 PM
Peter - Jul 30, 2013 at 05:55 PM
Related:
- Conditional Formatting in Excel2010
- Excel conditional formatting if another cell contains specific text ✓ - Excel Forum
- Conditional formatting if another cell contains any text ✓ - Excel Forum
- How to change date format in excel - Guide
- Conditional format based on another cell containing text - Excel Forum
- Excel conditional formatting if cell contains multiple specific text ✓ - Excel Forum
1 reply
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 16, 2023
545
Jul 30, 2013 at 10:55 AM
Jul 30, 2013 at 10:55 AM
Hi Peter,
Right-click your sheets tab.
Click "View code".
A new window appears showing a big white field.
Paste the code in that field.
Check the green text to adjust the location of the data list.
Now you can close the code window and see if the Data list cell changes colors appropriately.
Here is the code:
I kept it as simple as possible.
Best regards,
Trowa
Right-click your sheets tab.
Click "View code".
A new window appears showing a big white field.
Paste the code in that field.
Check the green text to adjust the location of the data list.
Now you can close the code window and see if the Data list cell changes colors appropriately.
Here is the code:
Private Sub Worksheet_Change(ByVal Target As Range) Dim mR As Range Set mR = Range("A5") 'Change range to match yours If Intersect(Target, mR) Is Nothing Then Exit Sub If Left(mR, 1) = "L" Then mR.Interior.ColorIndex = 43 If Left(mR, 1) = "M" Then mR.Interior.ColorIndex = 6 If Left(mR, 1) = "H" Then mR.Interior.ColorIndex = 44 If Left(mR, 1) = "E" Then mR.Interior.ColorIndex = 3 End Sub
I kept it as simple as possible.
Best regards,
Trowa
Jul 30, 2013 at 05:55 PM
Regards
Peter