Value of a cell in a range if color is yellow

  • Thread starter Thread starter Dominique Feteau
  • Start date Start date
D

Dominique Feteau

I searched the board for the answer to this question and went to
http://www.cpearson.com/excel/colors.htm to see if i could find what i
needed but to no avail. What I need is a formula that will look in a range,
b12:m12 (which are months formatted as mmm-yy) and give me the value of that
cell that is yellow.

Can anyone help me out?

Dominique
 
try
Sub yellowvalue()
For Each c In [b12:m12]
If c.Interior.ColorIndex = 6 Then MsgBox c
Next
End Sub
 
Don

Thanks for the code, but is there any way I can make it into a function? So
that I can have it automatically calculate in each sheet I put it in?

Dominique

Don Guillett said:
try
Sub yellowvalue()
For Each c In [b12:m12]
If c.Interior.ColorIndex = 6 Then MsgBox c
Next
End Sub

--
Don Guillett
SalesAid Software
(e-mail address removed)
Dominique Feteau said:
I searched the board for the answer to this question and went to
http://www.cpearson.com/excel/colors.htm to see if i could find what i
needed but to no avail. What I need is a formula that will look in a range,
b12:m12 (which are months formatted as mmm-yy) and give me the value of that
cell that is yellow.

Can anyone help me out?

Dominique
 
I want to be able to set a different range if i must as well. I dont want
anything too static.

i appreciate all your help

Dominique

Don Guillett said:
try
Sub yellowvalue()
For Each c In [b12:m12]
If c.Interior.ColorIndex = 6 Then MsgBox c
Next
End Sub

--
Don Guillett
SalesAid Software
(e-mail address removed)
Dominique Feteau said:
I searched the board for the answer to this question and went to
http://www.cpearson.com/excel/colors.htm to see if i could find what i
needed but to no avail. What I need is a formula that will look in a range,
b12:m12 (which are months formatted as mmm-yy) and give me the value of that
cell that is yellow.

Can anyone help me out?

Dominique
 
Back
Top