Thread: Help me PLEASE
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Ms-Exl-Learner Ms-Exl-Learner is offline
external usenet poster
 
Posts: 506
Default Help me PLEASE

David Sir, Thanks for highlighting my mistake€¦Today I have learned two
informative information by way of your post.

--------------------
(Ms-Exl-Learner)
--------------------



"David Biddulph" wrote:

In general I would not advise outputting a text string in a cell where a
number is expected.

Better to get rid of the quote marks and change your
=IF((D2-8)<0,"0",(D2-8)) to =IF((D2-8)<0,0,(D2-8)) or more simply to
=IF(D2<8,0,D2-8) or to =MAX(D2-8,0)
--
David Biddulph

"Ms-Exl-Learner" wrote in message
...
Try this...

Make your both Sheet1 and Sheet 2 Data Like this...

Sheet 1 & 2 Data

A B C D E
Oct 1st In Time Out Time Total Hrs OT
John Doe 5:00 AM 2:30 PM 9.5 1.5

Format the B&C Column as Time. D&E Columns should be formatted as
General.

In Total Hrs that is D2 put this formula =((C2-B2)*(24))

Add one more field OT in E. For OT calculation that is in E2 put this
formula

=IF((D2-8)<0,"0",(D2-8))

....