format cell

VbaHell

Well-known Member
Joined
Jan 30, 2011
Messages
1,220
Good afternoon all

I am looking for help please on two areas

First is it possible to format a cell to restrict the number of Characters and format IE.
000012345-0015
000014564-0034

I would like to have the dash automatically put in and make sure the number of Characters are correct

Second Is it possible to make these unique so you cannot enter the same reference in the same column

Any help would be appreciated
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi

Highlight your range of cells, right click, Format Cells, Number, Custom and paste this into the "Type" box 0000000-0000

To prevent the length of characters from being too small or large, highlight your range of cells and go to Data Validation press Alt-D-L select Text Length from the Drop Down, Select Equal to in the Data Drop Down, type in how many characters should be entered.

I'm not sure how you can stop duplicates in the column from being entered.

I hope this helps a bit.

Ak
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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