View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Siteman Siteman is offline
external usenet poster
 
Posts: 7
Default time calculation


Thanks for your quick response. this did not work, it came back with an
error in value message. I am wondering if it has to do with the am and pm
that is in the cell with the times. also do i have each cel formatted
properly?

the cells have this exaclty

start end hours
11:10am 01:00pm

i have the time cells formatted in custom, with the following

Time cells h:mm AM/PM
and the total hours, formated as ,, number -123.10
any other ideas?









"Glenn" wrote:

Siteman wrote:
i have read and tried all of the threads on calculating time difference but
none of them work.

Specifically
i have done an export of data to excell the times come out like this,
A B C
start end
2:00pm 3:50pm 1 ( i want to round this to the nearest hour)

I formated the above cells h:mm pm
and the formula cell as general with decimals

i have tried =b1-a1
=int((b1-a1)*24)

none of which work, if i delete the pm or am it will calculate, but not
accurately.

I want to round up the time calculation to the nearest number,
ie, 2:00pm 3:50pm 2(hours)

any thoughts?



=ROUNDUP((B1-A1)*24,0)