Custom format for Driver License Number

Gregc

Board Regular
Joined
Apr 24, 2002
Messages
75
I am trying to make a custom format for a license the format it A-111-111-111-111 . The problem is the letter. How do I make a custom format that puts dashes between the letter and the number. I can do it if it is only numbers.

Thanks,

Greg
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Gregc said:
I am trying to make a custom format for a license the format it A-111-111-111-111 . The problem is the letter. How do I make a custom format that puts dashes between the letter and the number. I can do it if it is only numbers.

Thanks,

Greg

You'll need to enter the dashes or insert the dashes using a formula.
 
Upvote 0
Can I use formulas in a custom format? I can figure out how to make a formula in an adjacent cell, but I want to be able to type it in a cell and have it work like a telephone or social security number format.
 
Upvote 0
>Can I use formulas in a custom format?

No.

> ...but I want to be able to type it in a cell and have it work like a telephone or social security number format.

You'll need a VBA macro.
 
Upvote 0
You can use the custom format. I do it with my Purchase Orders to create unique codes for different schools.

ie: 4-59IQ-123-PO

Once the cell is formated every entry appears as the above format

Just highlight the cell(s) you want formated, right click, choose custom for mat and enter: A-000-000-000-000

All numerical entries in this cell will be formated this way.

ie; Enter 123456789000

result: A-123-456-789-000

Hope that helps
 
Upvote 0
ROBINSYN said:
You can use the custom format...

Custom formats only apply to numeric values...

Gregc said:
...The problem is the letter. How do I make a custom format that puts dashes between the letter and the number. I can do it if it is only numbers
 
Upvote 0
Sorry to jump in at the last minute - uninvited and all - but I think there's some cross-discussion going on.

Robinsyn - I think your format only works because you are hard-coding the first character as "A", whereas, as Mark suggests, you can't use a custom format that mixes alpha and numeric based on GregC's request.
 
Upvote 0

Forum statistics

Threads
1,221,476
Messages
6,160,062
Members
451,615
Latest member
soroosh

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