2

When using the format for dd:hh:mm Excel gives us, it is not possible to show an amount of days greater than 31.

Using the following formula in macro is not possible

=INT(C5)&":"&TEXT(C5,"hh:mm:ss")

Does anyone know a way to translate a number to dd:hh:mm using a VBA macro?

1

1 Answer 1

0

Im not quite sure what it is you are after but I think what you were looking for is the Format function?

Sub Test()

Dim C5As Double: C5= 44.509201
Debug.Print Int(C5) & ":" & Format(C5, "hh:mm")

End Sub

enter image description here

1
  • @Den, has this been helpfull to answer your question?
    – JvdV
    Commented Aug 20, 2019 at 7:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .