Format cells option for a cell in an excel

Nikhil2803

New Member
Joined
Jul 18, 2023
Messages
37
Office Version
  1. 365
Platform
  1. Windows
I have a column as ZIP code based out of USA that can have maximum length as 5. If I give 11, then it can take 000 as predecessors and become 00011. I tried formatting cells option but that has options to make it 0011 or 000-11 or 000000011. I am not getting options to make 00011.

Any leads on this will be highly appreciated. Thank you.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Use a custom format of 00000
Thank you. It is working now. Can you also help me if user can be restricted to provide length higher than 5. If he gives 123456, he/she should get an error that max length is 5. I can not do data validations as I have write some other validations there.
 
Upvote 0
What kind of validation do you have currently? Can you not add this one in?
 
Upvote 0
What kind of validation do you have currently? Can you not add this one in?
I am checking if a different cell contains values or not. I can not add multiple data validations for a cell.
 
Upvote 0
How are you checking that? If using a formula, you can simply add another test.
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,117
Members
453,021
Latest member
Justyna P

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