Thread: [Solved] Formula help request
View Single Post
 
Old 04-06-2012, 10:14 PM
Karthik Bhat Karthik Bhat is offline Windows Vista Office 2007
Novice
 
Join Date: Apr 2012
Posts: 1
Karthik Bhat is on a distinguished road
Default

Hi
As you have not given what each field represents I am making following assumption:

B= Start time
C= 1.5 hrs
D= End time
E= .5 hrs
You can modify your formulas as follows:

=HOUR(IF(F13="NO",((D13+E13)-(B13-C13)),0))*24

Make sure the start time and end time in column B and D contain both time and date (something like 0/1/1900 12:31:00 PM) else excel will not be able to calculate the hours correctly. If you do not want to see this format on your screen just change the format to HH:MM.

You may also use following formula:
=HOUR(IF(F13="NO",(D13-B13+TIME(2,0,0)),0))*24

With this formula you just need start time and end time. Make sure that the column in which you enter this formula to calculate per diem is formatted as a number.

Thx
KB
Attached Files
File Type: xlsx Formula_7Apr.xlsx (8.7 KB, 6 views)
Reply With Quote