Excel 2019 - data validation

falcios

Active Member
Joined
Aug 30, 2006
Messages
279
Office Version
  1. 2019
Platform
  1. Windows
For data validation, I need the columns to be a whole number and no more than six digits. Can you help with this please
Thanks in advance
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Try this for the formula for DV. ex is for column A
Excel Formula:
=AND(LEN($A1)=6,INT($A1)=$A1)
 
Upvote 0
=AND(LEN($B1)=6,INT($B1)=$B1)

I'm getting the message, the value doesn't match the data validation restrictions defined for this cell
Retry
Cancel
Any idea what is going ong
 
Upvote 0
That is the Defualt message when the Users input a value that is not 6 digits or whole number. You can customize the message to on the DV menu under "Error Alert" tab

like
Book3
A
1
2
3
4
5
6
7
8
9
10
Sheet1
Cells with Data Validation
CellAllowCriteria
A1:A10Custom=AND(LEN($A1)=6,INT($A1)=$A1)
 
Upvote 0
Can I use the data validation or do I need the formula as well?
 
Upvote 0
What about these settings?

1645848853837.png
 
Upvote 0
In data validation, I used custom and the above formula, and it's still not working. Do you have any other suggestion to get it to work
Thanks in advance
 
Upvote 0
In data validation, I used custom and the above formula, and it's still not working. Do you have any other suggestion to get it to work
Thanks in advance
Who are you responding to?
My suggestion did not involve any formulas. Excel data validation has a built-in section for exactly what you described that you want to do.
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,582
Members
449,089
Latest member
Motoracer88

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