format cell based on results of vlookup function

G

Guest

I am using the vlookup function to look at 2 seperate worksheets and take
values from the cells of one or the other worksheet based on the results of
the vlookup and merging the information on a 3rd worksheet. The 3rd
worksheet has a job id which is the lookup value and based on that id, cells
are selected from one of the original worksheets. Some of the original
worksheet cells are formatted a different color (red), but when they are
moved to the 3rd (merged) worksheet they are black (the default color). I
looked at using conditional formatting but don't know how to get it to work
since the result is based on the vlookup function. What I want to do is get
the cells that are red on the original worksheet to be red on the new merged
worksheet. Is there any way to do that as part of the update without having
to manually change the color?
 
B

Biff

Hi!

Are the red cells on the other sheets conditionally formatted? If so, just
use the same logic on sheet3 as is used on the other sheets.

If the cf is based on the value of a cell on a different sheet then you
cannot directly reference that cell in a cf formula. For example, you want
sheet3 A1 fill color to be yellow if sheet1 A1 =10. You would have to do
this by:

Conditional Formatting
Formula is: =INDIRECT("Sheet1!A1")=10

Or, by using a defined name:

Insert>Name>Define
Name: Sh1A1
Refers to: =Sheet1!$A$1

Then

Conditional Formatting
Formula is: =Sh1A1=10

Biff
 

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