Remove the last 3 characters from a number

toplad

New Member
Joined
Apr 12, 2015
Messages
19
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi guys,

Ive spent the last 2 hours trying to solve this problem and I've hit a wall.

I have this number in a cell 00:20:00 i'd like to remove the last three characters :00 iv'e tried using left and right but it doesn't work and outputs some random number and not 00:20 after striping the last 3 characters.

Basically what im trying to solve (just in case there's an easier way) is converting a list like the one below where it sometimes has the odd one with extra 00's in to minutes in the next column so 00:20 would be 20 and so on.

[TABLE="width: 61"]
<tbody>[TR]
[TD]00:20[/TD]
[/TR]
[TR]
[TD]00:20[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]00:20:00[/TD]
[/TR]
[TR]
[TD]00:30[/TD]
[/TR]
[TR]
[TD]00:20[/TD]
[/TR]
[TR]
[TD]00:30
01:05[/TD]
[/TR]
[TR]
[TD]00:30[/TD]
[/TR]
[TR]
[TD]00:20[/TD]
[/TR]
[TR]
[TD]00:20[/TD]
[/TR]
[TR]
[TD]00:20[/TD]
[/TR]
[TR]
[TD]00:20[/TD]
[/TR]
[TR]
[TD]00:30[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]00:30[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD]00:20[/TD]
[/TR]
[TR]
[TD]00:20[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Yeah they should always be in the format of 00:00 they will never go into 00:00:00 its just for some reason a 00:00:00 format sneaks into the list somehow. I tried your code and it said value?
 
Upvote 0
Copy and paste down as required, make sure to remove the first & last speech marks.

"=text(a1,"hh:mm")"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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