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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
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,214,932
Messages
6,122,332
Members
449,077
Latest member
jmsotelo

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