Concatenate with Round in Numbers - bug

I am trying to display a time from a number of seconds.


Let's say 140 seconds. I want to display 2:20.5 (2 minutes, 20.5 seconds)


Let's say my number is in A1


ROUNDDOWN(A1÷60,0)

Result: 2


-


CONCATENATE(ROUNDDOWN(A1÷60,0),":",MOD(A1,60))


Result: 2.0:20.5


This is obviously not the expected behavior.


-


If I change the formatting of the source cell to two decimal places:

Result: 2.00:20.50


If I add "FIXED":

CONCATENATE(FIXED(ROUNDDOWN(A1÷60,0)),":",MOD(A1,60))

Result: 2.00:20.50


It seems to be something with concatenate where it ignores rounding and follows the formatting of a source cell.


Excel does this correctly.

Posted on Dec 8, 2023 4:24 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 8, 2023 4:50 PM

holesinthinair wrote:

I am trying to display a time from a number of seconds.

Let's say 140 seconds. I want to display 2:20.5 (2 minutes, 20.5 seconds)

I do not understand. 140 seconds equals 2 minutes, 20 seconds, not 2 minutes, 20.5 seconds.

What is the actual value in your cell A1? It seems to be some value that displays as 140, but is in fact approximate.

With A1 selected, look at the bottom left of your Numbers window. What do you see?


Try this formula, and reply with your result:

INT(B2÷60)&":"&MOD(B2,60)


Regards,

Ian.

6 replies
Question marked as Top-ranking reply

Dec 8, 2023 4:50 PM in response to holesinthinair

holesinthinair wrote:

I am trying to display a time from a number of seconds.

Let's say 140 seconds. I want to display 2:20.5 (2 minutes, 20.5 seconds)

I do not understand. 140 seconds equals 2 minutes, 20 seconds, not 2 minutes, 20.5 seconds.

What is the actual value in your cell A1? It seems to be some value that displays as 140, but is in fact approximate.

With A1 selected, look at the bottom left of your Numbers window. What do you see?


Try this formula, and reply with your result:

INT(B2÷60)&":"&MOD(B2,60)


Regards,

Ian.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Concatenate with Round in Numbers - bug

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.