Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default conditional formatting based on different cells with more conditio

I'm trying to get conditional formatting in the cells in one column. I want
them to be blue if the cell in front of it contains the value "N/A", I want
it to be green if the cell in front of it contains a value greater than 180,
i want it to be yellow if the cell in front of it is greater than 180 AND if
the months in the two cells before THAT one are 6 months apart.

ex: A5= 12/20/2007; B5= 7/25/2008; C5= 218 (formula of B5-A5); D5 has a
conditional formula to produce the answer "No" because C5 is greater than
180. But I need that to automatically shade green.

BUT...if A6=12/19/2007 and B6= 6/25/2008, C6 will be 189. The formula in D6
produces a "No" but I need it to be yellow because even though it is greater
than 180, the month in A6 (December) is 6 months away from the month in B6
(june). Is this even possible?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 222
Default conditional formatting based on different cells with more conditio

You get 3 levels of conditional formatting, so this should work:

Condition1: Formula Is:
=D5="N/A"
Format: Blue background

Condition2: Formula Is:
=(IF(YEAR(A5)=YEAR(B5),MONTH(B5)-MONTH(A5),
MONTH(B5)+12-MONTH(A5)))<=6
Format: Yellow background

Condition3: Formula Is:
=(IF(YEAR(A5)=YEAR(B5),MONTH(B5)-MONTH(A5),
MONTH(B5)+12-MONTH(A5)))6
Format: Green background


--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"sarajane82" wrote:

I'm trying to get conditional formatting in the cells in one column. I want
them to be blue if the cell in front of it contains the value "N/A", I want
it to be green if the cell in front of it contains a value greater than 180,
i want it to be yellow if the cell in front of it is greater than 180 AND if
the months in the two cells before THAT one are 6 months apart.

ex: A5= 12/20/2007; B5= 7/25/2008; C5= 218 (formula of B5-A5); D5 has a
conditional formula to produce the answer "No" because C5 is greater than
180. But I need that to automatically shade green.

BUT...if A6=12/19/2007 and B6= 6/25/2008, C6 will be 189. The formula in D6
produces a "No" but I need it to be yellow because even though it is greater
than 180, the month in A6 (December) is 6 months away from the month in B6
(june). Is this even possible?

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
Conditional Formatting Based of Cells Based on Data Entry in anoth Jim Excel Discussion (Misc queries) 3 November 11th 08 11:52 PM
Conditional Formatting Based on two cells in a row [email protected] Excel Worksheet Functions 2 May 18th 07 03:49 PM
Conditional Formatting based on other cells userzero Excel Worksheet Functions 4 April 6th 06 11:16 PM
Conditional Formatting Multiple cells based on 2 cells Louis Markowski Excel Worksheet Functions 2 June 1st 05 05:26 PM
To set the whole row in a particular colo. (based on some conditio Venkatesh V Excel Discussion (Misc queries) 2 March 12th 05 09:25 AM


All times are GMT +1. The time now is 07:09 AM.

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

About Us

"It's about Microsoft Excel"