Condition depending on tab colour

E

excel

Can I have a cell in a worksheet (any cell at this stage) that shows
say a '1' if that worksheet tab colour is green, and a '2' if that
worksheet tab colour is red, nothing if there is no colour?, and if
so, how would i do that?

TIA
Esra
 
V

Vasant Nanavati

Not without using a macro. And if the tab color changes the number will not
change.
_________________________________________________________________________
 
E

excel

Can I have a cell in a worksheet (any cell at this stage) that shows
say a '1' if that worksheet tab colour is green, and a '2' if that
worksheet tab colour is red, nothing if there is no colour?, and if
so, how would i do that?

TIA
Esra

can i perhaps execute the macro at any stage to reflect any change of
colour? and if so, what would be the macro?

TIA
Esra
 
B

Bob Phillips

An example

Public Sub TestTabColour()

With ActiveSheet
Select Case .Tab.ColorIndex
Case 10: .Range("A1").Value = 1
Case 3: .Range("A1").Value = 2
'etc
End Select
End With
End Sub


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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.

Ask a Question

Top