#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default Formula Help

Need help correcting this formula please. using excel 2003.

Col B is start time
Col C is end time
Col D =(C2-B2)*24
Col E =IF(D2<=5,D2,IF(D25<10,(D2-0.5),IF(D2=10,(D2-1.0))))

Works of when the time is less than 5 hours and more than 10 hours, but when
the time is more than 5 and less than 10 the answer is "False"

Please help me fix this error.

Thanks in advance

chefmike
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Formula Help

=IF(D2<=5,D2,IF(D2=10,D2-1.0,D2-0.5))
--
David Biddulph

"chefmike" wrote in message
...
Need help correcting this formula please. using excel 2003.

Col B is start time
Col C is end time
Col D =(C2-B2)*24
Col E =IF(D2<=5,D2,IF(D25<10,(D2-0.5),IF(D2=10,(D2-1.0))))

Works of when the time is less than 5 hours and more than 10 hours, but
when
the time is more than 5 and less than 10 the answer is "False"

Please help me fix this error.

Thanks in advance

chefmike



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,069
Default Formula Help

you need to look at the D25<10 part. Try
=IF(D2<=5,D2,IF(OR(D25,D2<10),(D2-0.5),IF(D2=10,(D2-1))))
--
John
MOS Master Instructor Office 2000, 2002 & 2003
Please reply & rate any replies you get

Ice Hockey rules (especially the Wightlink Raiders)


"chefmike" wrote:

Need help correcting this formula please. using excel 2003.

Col B is start time
Col C is end time
Col D =(C2-B2)*24
Col E =IF(D2<=5,D2,IF(D25<10,(D2-0.5),IF(D2=10,(D2-1.0))))

Works of when the time is less than 5 hours and more than 10 hours, but when
the time is more than 5 and less than 10 the answer is "False"

Please help me fix this error.

Thanks in advance

chefmike

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



All times are GMT +1. The time now is 11:02 AM.

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"