Input Mask

Diesel9a1

New Member
Joined
Feb 12, 2015
Messages
37
Normally this would be Format Cells / Number / Custom, then enter my mask, but I'm struggling with this one.
I need the following:
086/63192

displaying as:
0086/063192
(Four/Six) format.

Excel needs to add zeros at the start of the first part and the second part of the number to pad it out correctly.

Any thoughts?

Thanks in advance.

Pete
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
If your data is ALWAYS in the form of 3 digits then slash then 5 digits, this will do it: =TEXT(LEFT(A1,3),"0000")&"/"&TEXT(RIGHT(A1,5),"000000"), but obviously in a separate cell.
 
Last edited:
Upvote 0
Putting your formula in cell B1 Jim, I get the following:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A1[/TD]
[TD]B1[/TD]
[/TR]
[TR]
[TD]56/3564[/TD]
[TD]56///3564[/TD]
[/TR]
</tbody>[/TABLE]

In B1, I'm looking to see 0056/003564
 
Last edited:
Upvote 0
Yeah thats why I asked if the format of the data was always as you wrote in the example - it obviously isn't - however, there is a way forward just give me a few minutes to work on it.
 
Upvote 0
Try this: =TEXT(LEFT(A1,FIND("/",A1)-1),"0000")&"/"&TEXT(MID(A1,FIND("/",A1)+1,6),"000000")
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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