Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to write a macro that takes a time value in seconds (decimal) and converts it to mm:ss.00 format (two decimal places.) The closest I've come is this:

Application.Text((1.23 / 86400), "mm:ss.00")

Which results in:


I can't figure out why it's not showing the second decimal place. Format() doesn't work either, it does something even weirder.

share|improve this question
This is strange - on my machine your returned the expected 00:01.23. Could it be locale specific? – Peter Albert Dec 16 '13 at 7:51
Mine has the same result as Peter Albert. I used the immediate window for Debug.Print Application.Text((1.23 / 86400), "mm:ss.00") and the result was 00:01.23 – Engineer Toast Feb 27 at 19:43

1 Answer 1

Can you use the .numberformat property?


Cells(2, 3) = Application.Text((1.23 / 86400), "mm:ss.00")
Cells(2, 3).NumberFormat = "mm:ss.00"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.