# calculating transactions per second and per hour

G

#### Guest

number of date/time stamps for different activities that occur during a
transaction run.
So it would be something like
Cell A1 Start of run
Cell A2 End of first phase
Cell A3 End of second phase
Cell A4 Number of records in run
etc until
Cell A9 Finish of run

I then calculate the durations for each phase, which is a simple date
subtraction.
Now I want to work out the transactions per second and per hour for each
phase which will be the Number of records in run divided by the duration, but
how do I get the duration from an hh:mm:ss to just seconds or just hours?
Thanks

T

#### Tushar Mehta

The easiest way is to exploit knowledge of how XL stores a date-time
value.

A date-time is stored with the date to the left of the decimal point
and the fraction part containing the time. So, if your duration value
is in cell A10, the formula =A10*24 will give you the number of hours.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

T

#### TroyW

If your duration time value is in cell B1 then:
Duration_days = B1
Duration_hours = B1*24
Duration_minutes = B1*24*60
Duration_seconds = B1*24*60*60

The formats of the cells need to be one of the numeric formats (not
Date/Time) to display properly.

Troy