+ Reply to Thread
Results 1 to 7 of 7

Changing cell formatting with IF function

  1. #1
    Bruise
    Guest

    Changing cell formatting with IF function

    I am trying to set up a code to change the cell color and font color depending on the entry in a particular cell.

    Example:

    If C2 is "John", then D2, E2, F2, G2 cell colors change to red with white, bold lettering.

    If C2 is anything but "John", the D2, E2, F2, G2 cell colors stay normal, as does the font.

    Can anyone help me with this?



  2. #2
    PC
    Guest

    Re: Changing cell formatting with IF function

    Look at Conditional Formatting

    Select the cells in columns D,E,F & G and then

    Format/Conditional Format

    Select Formula Is and use

    =$C2="John"

    HTH

    PC


    "Bruise" <[email protected]> wrote in message news:[email protected]...
    I am trying to set up a code to change the cell color and font color depending on the entry in a particular cell.

    Example:

    If C2 is "John", then D2, E2, F2, G2 cell colors change to red with white, bold lettering.

    If C2 is anything but "John", the D2, E2, F2, G2 cell colors stay normal, as does the font.

    Can anyone help me with this?



  3. #3
    Jason Morin
    Guest

    RE: Changing cell formatting with IF function

    1. Select D2:G2.
    2. Go to Format > Conditional Formatting
    3. Select "Formula Is".
    4. Insert:
    =$C$2="John"
    5. Press the Format radio button and format as desired.

    HTH
    Jason
    Atlanta, GA

    "Bruise" wrote:

    > I am trying to set up a code to change the cell color and font color depending on the entry in a particular cell.
    >
    > Example:
    >
    > If C2 is "John", then D2, E2, F2, G2 cell colors change to red with white, bold lettering.
    >
    > If C2 is anything but "John", the D2, E2, F2, G2 cell colors stay normal, as does the font.
    >
    > Can anyone help me with this?
    >
    >


  4. #4
    Bruise
    Guest

    Re: Changing cell formatting with IF function

    Wow! You guys are quick!

    Thanks for the help. It's truly appreciated.




  5. #5
    Bruise
    Guest

    Re: Changing cell formatting with IF function - FOLLOWUP

    FOLLOWUP...

    With Conditional Formatting, will I use the format/formula mentioned above
    if someone does a copy/paste? Can I somehow LOCK conditional formatting to
    avoid this problem?

    Thanks, in advance, for your help.



  6. #6
    Bruise
    Guest

    Re: One more time and I'll stop

    Thank you for the help on setting this up. My only question now is this: How can I set this Conditional Formatting up for several rows without having to do it individually for each row? I tried selecting them all, but it reverts to the absolute formula and reflects entries in that cell only.

    Help!!



  7. #7
    Vasant Nanavati
    Guest

    Re: One more time and I'll stop

    If you use PC's method (subtly different from Jason's), selecting all the
    rows and then setting the condition will work.

    --

    Vasant

    "Bruise" <[email protected]> wrote in message
    news:[email protected]...
    Thank you for the help on setting this up. My only question now is this:
    How can I set this Conditional Formatting up for several rows without having
    to do it individually for each row? I tried selecting them all, but it
    reverts to the absolute formula and reflects entries in that cell only.

    Help!!




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1