Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old May 20th 05, 02:40 AM
Bruise
 
Posts: n/a
Default 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   Report Post  
Old May 20th 05, 02:52 AM
PC
 
Posts: n/a
Default

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" wrote in message ...
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   Report Post  
Old May 20th 05, 02:58 AM
Jason Morin
 
Posts: n/a
Default

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   Report Post  
Old May 20th 05, 03:15 AM
Bruise
 
Posts: n/a
Default

Wow! You guys are quick!

Thanks for the help. It's truly appreciated.



  #5   Report Post  
Old May 20th 05, 10:47 PM
Bruise
 
Posts: n/a
Default

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   Report Post  
Old May 21st 05, 11:29 PM
Bruise
 
Posts: n/a
Default

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   Report Post  
Old May 21st 05, 11:40 PM
Vasant Nanavati
 
Posts: n/a
Default

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

--

Vasant

"Bruise" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function syntax to compare cell contents ES Excel Worksheet Functions 2 May 18th 05 03:53 PM
How do I obtain the address of a cell using the vlookup function? Spock Excel Worksheet Functions 2 May 16th 05 06:35 PM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
Function to determine if any cell in a range is contained in a given cell [email protected] Excel Worksheet Functions 3 February 7th 05 04:19 PM
Function making cell really "empty" Arvi Laanemets Excel Worksheet Functions 2 January 31st 05 05:23 PM


All times are GMT +1. The time now is 06:50 PM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright 2004-2021 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017