# If/Then formula to change cell color

This is a discussion on If/Then formula to change cell color within the Excel Questions forums, part of the Question Forums category; I want to know if it's possible to use an If/Then formula to change a cell's color? Even changing the ...

1. ## If/Then formula to change cell color

I want to know if it's possible to use an If/Then formula to change a cell's color? Even changing the text color would be cool.

I have two worksheets in the same spreadsheet. The first one is a complete list of names and the second is a list of names in a particular group.

I want to say IF this person belongs to the group on worksheet2, then highlight the cell with their name on worksheet1.

Can this be done?

ALTERNATELY, I would be happy with a remark in another column that indicates that the person is part of the group.

2. ## Re: If/Then formula to change cell color

If A1 is your cell to be formatted and tbl1 = the range name of your lookup table, then select A1, choose FORMAT, CONDITIONAL FORMATTING from the menu, for condition 1 choose Formula is... and enter =VLOOKUP(A1,tbl1,1, false)=A1

3. ## change a color of a cell

hi
i have a drop list and i want if "X" is choosed from the drop list, the color of an other cell in an other sheet will be changed
anyone can help me in this?
thank u

4. ## Re: change a color of a cell

Tinkerbell:
You will have to assign a "Name" to your list on Sheet2. (say myRange)
Now in CF, Formula Is
Code:
`=MATCH(A1,myRange,0)`
You need the "Name" because CF will not work with Defined Ranges across sheets.

wolves: The same logic applies to your question
lenze

5. ## lock a cell

Dear Sir
sorry for bothering you again
but i would ask how :
if i have the same two table in a different sheet
and when A1 (in the 1st sheet)=X from a drop down list the A1 in the second sheet will be unlocked.
how can apply this on all the cell of the table?
Regards and many thanks in advance

6. ## Re: lock a cell

wolves: This is really a different question from "Conditional Formatting" I suggest you start a new thread with an appropriate title regarding your requirements.This will, probably require VBA!! Is that an option?

lenze

7. ## Re: If/Then formula to change cell color

HEy I am tring to do the same thing . . but dirrerent! IF a cell is greater than 0 I want it to change color. is that possable?

8. ## Re: If/Then formula to change cell color

Yes. See the excellent articles and tutorials on "Conditional Formatting" at
www.contextures.com
lenze

9. ## i know

dear mr lenze
i know that it is a different subject
and sorry for not changing the title coz im a little confused about my prb.

can u help in this even through vba?

10. ## Re: If/Then formula to change cell color

Originally Posted by tinkerbell737
I want to know if it's possible to use an If/Then formula to change a cell's color? Even changing the text color would be cool.

I have two worksheets in the same spreadsheet. The first one is a complete list of names and the second is a list of names in a particular group.

I want to say IF this person belongs to the group on worksheet2, then highlight the cell with their name on worksheet1.

Can this be done?

ALTERNATELY, I would be happy with a remark in another column that indicates that the person is part of the group.
I have a similar problem to this but a little different. I have 1 sheet in a workbook that lists all stores by number and a 2nd sheet in the same workbook that lists only stores that received a particular item. I want only the stores that appear in sheet 2 to have an "X" in the appropriate column of sheet 1 for that store. How do I do this? I tried the vlookup formula you gave in this thread and it won't work? Thanks!

Page 1 of 2 12 Last

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•