Problem with chaining formulas in a single cell
I'm trying to get a number formatted as minutes:seconds, so zero would be "00:00", 73 would be "01:13", etc. I haven't found a PAD function, but I tried using NUMTOBASE as a hack. Here's what I tried:
Assume a fractional number of minutes is in cell A1. For discussion, let's say it's 36.5. In cell A2, calculate the #minutes:
=FLOOR(A1,1)
and seconds in cell A3:
=MOD(60*A1,60)
Now, use NUMTOBASE to pad with zeroes (in cell A4 and A5):
=NUMTOBASE(A2,10,2)
=NUMTOBASE(A3,10,2)
Finally, concatenate into a string in cell A6:
=CONCATENATE(A4,":",A5)
So far so good. I have "36:30" in cell A6, exactly what I want. However, I want to do all this at once - say A7 contains:
=CONCATENATE(NUMTOBASE(FLOOR(A1,1),10,2),":",NUMTOBASE(MOD(60*A1,60),10,2))
Here's what appears in A7:
0000000036:0000000030
Where'd all those extra zeroes come from??
Can anyone tell me what I'm doing wrong? Or (better yet) suggest a cleaner way to do this?
Numbers '09-OTHER, OS X Mountain Lion (10.8.5)