Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Shesh
 
Posts: n/a
Default If statements for time format

I have 4:12 in cell C12 (time format h:mm) and 4:18:57 in cell C13 (time
format h:mm:ss),
I want to write a formula in cell D12 which would give me a score of 20 if
the value in C12 is less than or equal to 5:00 and 0 if the value is more
than 5:00.
Similarly I want to write a formula in D13 which would again give me a score
of 20 if the value in C13 is more than or equal to 8:00:00 and 0 if value is
less than 8:00:00
  #2   Report Post  
Steve
 
Posts: n/a
Default

The trick is to change your time '5:00' in a formula to a time value

D12 formula =(C12<=TIMEVALUE("5:00"))*20

D13 formula =(C13=TIMEVALUE("8:00"))*20

The formulae above work because the evalueation part of the equation returns
1 (TRUE) or 0 (FALSE)

You could also us and If statement:

=if(C12<=TIMEVALUE("5:00"),20,0)




"Shesh" wrote in message
...
I have 4:12 in cell C12 (time format h:mm) and 4:18:57 in cell C13 (time
format h:mm:ss),
I want to write a formula in cell D12 which would give me a score of 20 if
the value in C12 is less than or equal to 5:00 and 0 if the value is more
than 5:00.
Similarly I want to write a formula in D13 which would again give me a
score
of 20 if the value in C13 is more than or equal to 8:00:00 and 0 if value
is
less than 8:00:00



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
Telephone number format MarkT Excel Discussion (Misc queries) 6 January 18th 05 10:39 PM
How do i change numbers in text format to number format? Greg New Users to Excel 1 December 14th 04 05:22 PM
copy conditional format as ACTUAL format Dana Zulager Excel Discussion (Misc queries) 7 December 7th 04 11:02 PM
Copying a conditional format Meaux Excel Worksheet Functions 2 November 29th 04 10:19 AM
When I select "format cells", the format dialog box does not disp. Andy S. Excel Worksheet Functions 2 November 23rd 04 03:49 AM


All times are GMT +1. The time now is 12:20 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"