Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 48
Default how to compare time in hh:mm format using IF function?

Sir,
This is a sample of worksheet.
D
6 4:00 AM
7 11:00 AM

And I have to subtract time using IF function and tried these syntexes
=IF(D6<"8:00",("8:00"-D6), IF(D6"8:00 AM", (D6 - "8:00"), "OK")) and
=IF(D6<"8:00", "LESS", IF(D6"8:00", "MORE", "OK")) and
=IF(D6<"8:00",("8:00"-D6), (MOD(D6-"8:00",1)))

But in all cases i found an error. I have to calculate the less time and
over time by an employee.

Please Suggest me. I have been tring it for 7-8days.




  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default how to compare time in hh:mm format using IF function?

Use
TIME(8,0,0)
instead of "8:00" string!

Regards,
Stefi

€˛Thanks€¯ ezt Ć*rta:

Sir,
This is a sample of worksheet.
D
6 4:00 AM
7 11:00 AM

And I have to subtract time using IF function and tried these syntexes
=IF(D6<"8:00",("8:00"-D6), IF(D6"8:00 AM", (D6 - "8:00"), "OK")) and
=IF(D6<"8:00", "LESS", IF(D6"8:00", "MORE", "OK")) and
=IF(D6<"8:00",("8:00"-D6), (MOD(D6-"8:00",1)))

But in all cases i found an error. I have to calculate the less time and
over time by an employee.

Please Suggest me. I have been tring it for 7-8days.




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
If statement to compare time cell to a time Z-Man-Cek Excel Worksheet Functions 16 July 29th 16 08:17 AM
verify use of TIME Function, Find Quantity Level compare to time-d nastech Excel Discussion (Misc queries) 9 July 11th 07 01:58 PM
Compare times : IF time < time2 then [email protected] Excel Worksheet Functions 4 July 12th 06 11:36 AM
compare time Eddie Munster Excel Discussion (Misc queries) 5 October 10th 05 01:27 AM
compare time in IF statement Excel Worksheet Functions 4 July 10th 05 06:18 PM


All times are GMT +1. The time now is 07:32 PM.

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"