Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 116
Default Two conditions in one cell. Help needed ASAP

Help on the below is needed, PLEASE

A6 is either to be the letter W or P only.
B6 is blank
C6 is strart date and time
D6 is end date and time
E6 blank
F6 is D6-C6 with the conditional format =AND($A$6="w",$F$6TIME(7,0,0))+$F$6
applied. Therefore if W is entered in A6 the difference in F6 will be
highlighted in red if more than 7 hours difference. Above works well BUT if I
want to use the same cells as above but instead of a W I now add the letter P
in A6 and I want cell F6 to now be highlighted blue but only if difference is
more than 10 hours.
I need both options in the above cells to work depending on which letter is
added in A6

To sum up: W =red if more than 7 hours difference
P =Blue if more than 10 hours diffenence

Clear as mud?






=AND($A$6="w",$F$6TIME(7,0,0))+$F$6
=AND($A$6="p",$F$6TIME(10,0,0))+$F$6


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Two conditions in one cell. Help needed ASAP

Use the add button in the conditional formating box for your 2nd formula.
enter the same as the 1st box.

"Marty" wrote:

Help on the below is needed, PLEASE

A6 is either to be the letter W or P only.
B6 is blank
C6 is strart date and time
D6 is end date and time
E6 blank
F6 is D6-C6 with the conditional format =AND($A$6="w",$F$6TIME(7,0,0))+$F$6
applied. Therefore if W is entered in A6 the difference in F6 will be
highlighted in red if more than 7 hours difference. Above works well BUT if I
want to use the same cells as above but instead of a W I now add the letter P
in A6 and I want cell F6 to now be highlighted blue but only if difference is
more than 10 hours.
I need both options in the above cells to work depending on which letter is
added in A6

To sum up: W =red if more than 7 hours difference
P =Blue if more than 10 hours diffenence

Clear as mud?






=AND($A$6="w",$F$6TIME(7,0,0))+$F$6
=AND($A$6="p",$F$6TIME(10,0,0))+$F$6


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 116
Default Two conditions in one cell. Help needed ASAP

Joel

Excel 2003 no problem, but how do you do this in 2007 without switching
between the 2?

"Joel" wrote:

Use the add button in the conditional formating box for your 2nd formula.
enter the same as the 1st box.

"Marty" wrote:

Help on the below is needed, PLEASE

A6 is either to be the letter W or P only.
B6 is blank
C6 is strart date and time
D6 is end date and time
E6 blank
F6 is D6-C6 with the conditional format =AND($A$6="w",$F$6TIME(7,0,0))+$F$6
applied. Therefore if W is entered in A6 the difference in F6 will be
highlighted in red if more than 7 hours difference. Above works well BUT if I
want to use the same cells as above but instead of a W I now add the letter P
in A6 and I want cell F6 to now be highlighted blue but only if difference is
more than 10 hours.
I need both options in the above cells to work depending on which letter is
added in A6

To sum up: W =red if more than 7 hours difference
P =Blue if more than 10 hours diffenence

Clear as mud?






=AND($A$6="w",$F$6TIME(7,0,0))+$F$6
=AND($A$6="p",$F$6TIME(10,0,0))+$F$6


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 88
Default Two conditions in one cell. Help needed ASAP

follow below, including cell formats:

- format cells C6 AND D6 as follows: Custom, dd/mm/yyyy h:mm AM/PM OR
similar format for your needs (12 hour clock or 24 hour clock)

- format cell F6 as follows: Custom, [h]:mm

- clear all existing rules in the cell that you want to use.
- From the Home Tab, Conditional Formatting, select New Rule, select use a
formula to determine... and enter the folowing =AND(A6="P",D6-C6TIME(10,0,0))
- select your color (in this case should be blue), press, ok, apply, ok
- now go back into conditional formatting, select Manage Rules, New Rule...,
select use a formula to determine... and enter the following
=AND(A6="P",D6-C6TIME(10,0,0))
- select your color (red), press ok, apply, ok,

test


jat


"Marty" wrote:

Joel

Excel 2003 no problem, but how do you do this in 2007 without switching
between the 2?

"Joel" wrote:

Use the add button in the conditional formating box for your 2nd formula.
enter the same as the 1st box.

"Marty" wrote:

Help on the below is needed, PLEASE

A6 is either to be the letter W or P only.
B6 is blank
C6 is strart date and time
D6 is end date and time
E6 blank
F6 is D6-C6 with the conditional format =AND($A$6="w",$F$6TIME(7,0,0))+$F$6
applied. Therefore if W is entered in A6 the difference in F6 will be
highlighted in red if more than 7 hours difference. Above works well BUT if I
want to use the same cells as above but instead of a W I now add the letter P
in A6 and I want cell F6 to now be highlighted blue but only if difference is
more than 10 hours.
I need both options in the above cells to work depending on which letter is
added in A6

To sum up: W =red if more than 7 hours difference
P =Blue if more than 10 hours diffenence

Clear as mud?






=AND($A$6="w",$F$6TIME(7,0,0))+$F$6
=AND($A$6="p",$F$6TIME(10,0,0))+$F$6

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
2 conditions needed to check and count of items based on that Vijay Excel Worksheet Functions 2 May 3rd 07 10:21 PM
How do i put a cell reference in an If Function? ASAP robbie Excel Worksheet Functions 2 February 13th 07 08:16 PM
How do i put a cell reference in an If Function? ASAP robbie Excel Worksheet Functions 1 February 13th 07 01:25 AM
Major Help Needed Asap ninjashadow80 Excel Worksheet Functions 7 July 24th 06 04:59 AM
Vlookup Help needed ASAP Vladimir Excel Worksheet Functions 7 October 15th 05 09:48 PM


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

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

About Us

"It's about Microsoft Excel"