Reputation: 145
I have an hour and a minute column in my dataset. I want to concatenate them so that there is a "." in between. In cases where the minute column is less than 10, I want to add a leading zero.
Example of what I want it to look like:
Hour(A): 1
Minute (B): 2
Desired Outcome (C): 1.02
I have been playing with this formula Con (A,”.”, IF (Len (B) =1, con (0, B), B)) but I can't seem to make it work
Can anyone give any insight?
Upvotes: 1
Views: 1276
Reputation:
Put this formula in column C,
=time(a1, b1, 0).
Format the cell as h.mm
.
Upvotes: 1
Reputation: 12113
Try this:
=A1&"."&TEXT(B1,"00")
Or this also works:
=TEXT(TIME(A1,B1,0),"h.mm")
As required:
Upvotes: 3