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 ...
- Jan 20, 2022
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) )
SergeiBaklan
Jan 20, 2022Diamond Contributor
- Becky_TomJan 20, 2022Copper Contributor
SergeiBaklan, thank you, but if I do this it goes to 24 hour clock...ie: 6:30 becomes 18:30
- SergeiBaklanJan 20, 2022Diamond 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) )
- Becky_TomJan 20, 2022Copper ContributorThanks, it works!!