Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula doesn't seem to be calculating correctly

Status
Not open for further replies.

bearnone

Programmer
Jan 7, 2003
10
US
Help.. I can't figure out why Excel is calculating this time function incorrectly. (see below)

Fomrula: Time(Hour(((H14-C14)-(E14-D14)-(G14-F14),Minute(((H14-C14)-(E14-D14)-(G14-F14))),0)*24

C14=8:00 AM
D14=10:00 AM
E14=11:00 AM
F14=2:30 PM
G14=3:00 PM
H14=5:30 PM

the result on Excel is 7.00, but I calculate it as 8.00

All help is appreciated.

Thanks.
Mark
 
I count 11 openening parentheses, but only 9 closing parentheses in your formula. If you care to post a function that actually works, perhaps someone can help you with it.

Alternatively, you could use this formula:
[blue]
Code:
   =(H14-C14)-(E14-D14)-(G14-F14)
[/color]

and format the cell as
[blue]
Code:
   [h]:mm
[/color]

to get the result I think you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top