Cell Time Format > Backspace before first character with no spaces present, changes cell data appearance

Chopsaki

New Member
Joined
Mar 23, 2019
Messages
7
Ok, so have imported data from another source and copied into excel. I have a column that contains a list of time stamps. The format for the cells is "Custom > h:mm". With this format, the data appears as follows:
  • 2:54:29 PM
Upon inspection, I found that the cells contained Leading Spaces, so I applied the following formula example to remove them:
  • =TRIM(CLEAN(SUBSTITUTE(K35,CHAR(160),)))[/CODE]
The net result was that any leading spaces were removed, however the data presentation in the cell remained unchanged. I then selected a cell, placing my cursor to the left of the first character and found no leading space. However, by pressing the "Backspace" key, the data represented changes and appears as follows:
  • 2:54
This above is the desired result. I'm not interested in selecting each cell and executing the "Backspace" key for reasons unexplained.

Any ideas as to what I have missed?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
"h:mm" format on 2:54 PM should show 14:54.

Also, you may be able to just use this formula, and not have to do any backspaces. (Format the result cell as h:mm or whatever you wish, of course.)
Excel Formula:
=SUBSTITUTE(K35,CHAR(160),"")+0
 
Upvote 0
"h:mm" format on 2:54 PM should show 14:54.

Also, you may be able to just use this formula, and not have to do any backspaces. (Format the result cell as h:mm or whatever you wish, of course.)
Excel Formula:
=SUBSTITUTE(K35,CHAR(160),"")+0[/C
[QUOTE="Z51, post: 5935800, member: 86898"]
"h:mm" format on 2:54 PM should show 14:54.

Also, you may be able to just use this formula, and not have to do any backspaces.  (Format the result cell as h:mm or whatever you wish, of course.)
[CODE=xls]=SUBSTITUTE(K35,CHAR(160),"")+0
Thanks for your response, however this has not resolved the issue.
[/QUOTE]
 
Upvote 0
Further to my problem, I can provide the following analysis:
MS Excel Format.JPG
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,585
Members
448,972
Latest member
Shantanu2024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top