# Excel performance calculations in milli- and microseconds

#### Gregor Gisler

##### New Member
Hi
I did a lot of calculations with performance measurement data. I was able to do the calcs, but ask myself whether there is no smarter way.
For example I use the following formula to subtract java style timestamps:
=(TIMEVALUE(MID(N3;1;8))+1.15740740740741E-08*MID(N3;10;12))
-(TIMEVALUE(MID(K3;1;8))+1.15740740740741E-08*MID(K3;10;12))

where N3=19:19:19,123 ->Formatted as text
and K3=20:20:20,321 ->Formatted as text
and 1.15740740740741E-08 is the internal Excel representation of a
millisecond

The result field is defined as Custom field: hh:mm:ss.000
This works fine. You even can calculate microseconds. My question:
Is there a better way to handle issues like this?
Thanks.
Gregor Gisler

### Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

#### Andrew Poulsom

##### MrExcel MVP
Re: Excel performance calculations in milli- and microsecond

Welcome to the Board.

This:

=SUBSTITUTE(A1,",",".")+0

will convert the text entry to a serial time value. Format the results as hh:mm:ss.000.

#### fairwinds

##### MrExcel MVP
Re: Excel performance calculations in milli- and microsecond

Hi,

seing the semicolons in Gregor's formulas, I guess comma could be the decimal separator for him. In that case you should not substitute, just try the =A1+0 part.

Replies
3
Views
7K

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,151,981
Messages
5,767,435
Members
425,413
Latest member
ccfam04

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back