Conditional Formatting in Excel2010
Solved/Closed
pjevans
Peter - Jul 30, 2013 at 05:55 PM
- Posts
- 1
- Registration date
- Friday July 26, 2013
- Status
- Member
- Last seen
- July 27, 2013
Peter - Jul 30, 2013 at 05:55 PM
Related:
- Conditional Formatting in Excel2010
- Conditional formatting if cell does not contain specific text ✓ - Forum - Excel
- Conditional formatting if another cell contains any text ✓ - Forum - Excel
- Excel conditional formatting 5 color scale ✓ - Forum - Excel
- Copy conditional formatting from one row to another ✓ - Forum - Excel
- If cell contains date then conditional format - Guide
1 reply
TrowaD
Jul 30, 2013 at 10:55 AM
- Posts
- 2880
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- May 2, 2022
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