excelexcel-formula

How to insert time formatted values into text in Excel


I have these rows that I would like to place in some other cell in the middle of some text, this is an example of my cells:

A B C D
1 6201100010355 1 08:00:00 09:30:00
2 6201100010355 1 08:00:00 09:30:00

And I'm using this formula to do it:

="some text ("&A1&","&B1&","&C1&","&D1&")"

But the result is not what I expected, I get this:

some text (6201100010355,1,0,333333333333333,0,395833333333333)

What I would like to get is this:

some text (6201100010355,1,08:00:00,09:30:00)


Solution

  • Do you mean you want time values to be shows as time, not their numerical values?

    ="some text (" & A1 & ", " & B1 & ", " & TEXT(C1, "hh:mm:ss") & ", " & TEXT(D1, "hh:mm:ss") & ")"