Cell Format

MarkAn

Board Regular
Joined
Sep 28, 2005
Messages
69
Office Version
  1. 2010
Hello

I am trying to format a cell so that it accepts UK Bank Sort Code data.

I want the cell to be formatted 00-00-00, however, I used cell format but some combinations of numbers entered, convert it to date format.

Can anyone please suggest, how I can format the cell, so that if either a 6 digit number is typed, it will display as 12-34-56, or if the user types including '-', is shows as such.

Many thanks in advance
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Could you let me know, what custom format you used please, as the one that I used, works fine if typing the numbers without '-', however, as above, if I type the numbers with '-' it reverts it to a date, I.e. if I type 40-18-36, it remains as this, however, if I type 10-12-12, it reverts it to 04-21-53 (the numerical date format).

Whereas if I typed 101212, it formats it correctly

Any help is much appreciated.
 
Upvote 0
Thank you for your suggestion, however, that also doesn't work.

Excel is looking at the figures entered, as if the first 2 are between 01 and 31 and the second 2 are between 01 and 12, it thinks that it is a date (by entering in "-") and coverts it.

I will have to think of another way.

Many thanks
 
Upvote 0
Hi.
Excel Workbook
AB
1100-00-01
21200-00-12
312300-01-23
4123400-12-34
51234501-23-45
612345612-34-56
700"-"00"-"00
Sheet
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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