Sub test()
If Sheets("Sheet2").Range("A1").Value <> "hello" Then
Sheets("Sheet1").Tab.ColorIndex = 6
Else
Sheets("Sheet1").Tab.ColorIndex = -4142
End If
End Sub
Sub test()
If Sheets("Sheet2").Range("A1").Value <> "hello" Then
Sheets("Sheet1").Tab.ColorIndex = 6
Else
Sheets("Sheet1").Tab.ColorIndex = -4142
End If
End Sub
Gord Dibben MS Excel MVP
can you take me through this as I don't know how to
Sub test()
If Sheets("Sheet2").Range("A1").Value <> "hello" Then
Sheets("Sheet1").Tab.ColorIndex = 6
Else
Sheets("Sheet1").Tab.ColorIndex = -4142
End If
End Sub
Hit ALT+ F11 and cop and paste Gord's code into the white space on the right
hand side of the window that appears. Hit save and close out of that window.
Now, if A1 contains something other than "Hello" you will see the tab color
for that sheet1 change.
Change the cell and sheet reference as appropriate for your sitatuation.
thank you I will try and let you know how I get on
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.