Forum Discussion
Becky_Tom
Jan 20, 2022Copper Contributor
Format a time cell to a text cell them making it look like a text I want
So I have entries in the time cell, start a end times, I made a text formula and column c is the result (08:30 AM-06:30 PM), what I want it to look like is what is in column D (8:30-6:30), any ideas on how I can accomplish this? Thank you...
formula to make it a text celltime cells
That could be something like
=MID( TEXT(O39, "hh:mm am/pm"), IF( 1*LEFT( TEXT(O39, "hh:mm am/pm") ) = 0, 2, 1), IF( 1*LEFT( TEXT(O39, "hh:mm am/pm") ) = 0, 4, 5) ) & "-" & MID( TEXT(P39, "hh:mm am/pm"), IF( 1*LEFT( TEXT(P39, "hh:mm am/pm") ) = 0, 2, 1), IF( 1*LEFT( TEXT(P39, "hh:mm am/pm") ) = 0, 4, 5) )
5 Replies
- SergeiBaklanDiamond Contributor
- Becky_TomCopper Contributor
SergeiBaklan, thank you, but if I do this it goes to 24 hour clock...ie: 6:30 becomes 18:30
- SergeiBaklanDiamond Contributor
That could be something like
=MID( TEXT(O39, "hh:mm am/pm"), IF( 1*LEFT( TEXT(O39, "hh:mm am/pm") ) = 0, 2, 1), IF( 1*LEFT( TEXT(O39, "hh:mm am/pm") ) = 0, 4, 5) ) & "-" & MID( TEXT(P39, "hh:mm am/pm"), IF( 1*LEFT( TEXT(P39, "hh:mm am/pm") ) = 0, 2, 1), IF( 1*LEFT( TEXT(P39, "hh:mm am/pm") ) = 0, 4, 5) )