Shade Cell based on condition

L

Laura

I am looking to shade a row of cells (but not the entire
row) based on information in a particular cell in that row.

eg. If cell G1 is "Y", shade A1:J1 green. If G1 if "N",
shade red.
 
F

Frank Kabel

Hi
try the following
- select all cells A1:J1
- goto 'format - Conditional Format'
- enter the formula
=$G1="Y"
- choose your format (green)
- add a new condition and enter the formula
=$G1="N"
- choose your format (red)

For more information about conditional formating you may have a look at
http://www.contextures.com/xlCondFormat01.html
 
P

Peo Sjoblom

select A1:J10, format>conditional formatting,
formula is and use $G$1="Y", click the format button and select
green under patterns, click OK, click add, formula is
$G$1="N", repeat and select a red colour, click OK twice
 
G

Guest

-----Original Message-----
Hi
try the following
- select all cells A1:J1
- goto 'format - Conditional Format'
- enter the formula
=$G1="Y"
- choose your format (green)
- add a new condition and enter the formula
=$G1="N"
- choose your format (red)

For more information about conditional formating you may have a look at
http://www.contextures.com/xlCondFormat01.html

--
Regards
Frank Kabel
Frankfurt, Germany


.
Thank you Frank for your quick response, unfortunately,
something isn't working right. I am cleaning up an old
spreadsheet of someone else's that wasn't working. When I
put in the formula it is doing the exact opposite of the
colors I'm choosing. When I use the formula in a clean
area, it works correctly, but in either case it is not
colored the cell that is being tested which is within the
range I'm selecting.

Any suggestions?

Laura
 
F

Frank Kabel

Hi Laura
what is the exact formula you entered in the conditional format dialog
and which format did you choose for each formula. interesting that it
works in a 'clean' sheet but not in your existing one
 

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