Value of a cell in a range if color is yellow

  • Thread starter Dominique Feteau
  • 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
 
D

Don Guillett

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

Dominique Feteau

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
 
D

Dominique Feteau

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
 

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