Page 1 of 2 12 LastLast
Results 1 to 10 of 12

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. #1
    Board Regular
    Join Date
    Nov 2002
    Posts
    96

    Default 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. #2
    Board Regular
    Join Date
    Dec 2002
    Posts
    1,199

    Default 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. #3
    New Member
    Join Date
    Dec 2009
    Posts
    19

    Default 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. #4
    MrExcel MVP lenze's Avatar
    Join Date
    Feb 2002
    Location
    Helena, MT
    Posts
    13,690

    Default 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
    If you have to tell your boss you're good with Excel, you're NOT!!
    All I know about Excel I owe to my ignorance!
    Scotch: Because you don't solve great Excel problems over white wine

  5. #5
    New Member
    Join Date
    Dec 2009
    Posts
    19

    Default 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. #6
    MrExcel MVP lenze's Avatar
    Join Date
    Feb 2002
    Location
    Helena, MT
    Posts
    13,690

    Default 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
    If you have to tell your boss you're good with Excel, you're NOT!!
    All I know about Excel I owe to my ignorance!
    Scotch: Because you don't solve great Excel problems over white wine

  7. #7
    New Member
    Join Date
    Feb 2010
    Posts
    2

    Default 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. #8
    MrExcel MVP lenze's Avatar
    Join Date
    Feb 2002
    Location
    Helena, MT
    Posts
    13,690

    Default Re: If/Then formula to change cell color

    Yes. See the excellent articles and tutorials on "Conditional Formatting" at
    www.contextures.com
    lenze
    If you have to tell your boss you're good with Excel, you're NOT!!
    All I know about Excel I owe to my ignorance!
    Scotch: Because you don't solve great Excel problems over white wine

  9. #9
    New Member
    Join Date
    Dec 2009
    Posts
    19

    Default 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. #10
    New Member
    Join Date
    Jul 2010
    Posts
    5

    Default Re: If/Then formula to change cell color

    Quote Originally Posted by tinkerbell737 View Post
    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 LastLast

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com