I want to create a validation rule to validate such that the values must be between 0-100 (only positive integers) and 'A'. How can I apply this validation in excel?
I want to create a validation rule to validate such that the values must be between 0-100 (only positive integers) and 'A'. How can I apply this validation in excel?
It must be a custom validation and here is the logic: =IF(ISNUMBER(B2),AND(B2>=0,B2<=100,B2=INT(B2)),B2="A")
One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.
A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.
Hello dflak ,
Thank You for your reply. I want to check if the cell is empty or not. In case of NULL, it should throw error. I tried from this link https://www.extendoffice.com/documen...low-blank.html but it's not working. What I did is ::
but this is throwing error.Please Login or Register to view this content.
You could also create a List of the 100 numbers and A and use the List option in the DV.
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
As far as I can see dflak's formula as-is does as well as is possible in making sure that the current cell is not left "empty". What the "countif" formula that you found does in addition is make sure that the user does not skip any rows. For example if you have valid data in E2:E4 and then try to make an entry in E6 (skipping E5) then you will get a validation error.I want to check if the cell is empty or not. In case of NULL, it should throw error.
If you are designing this worksheet for others to use then I would recommend you create a custom input message which defines what the valid inputs are. I would also create a custom error alert message if you are going with the "countif" addition because if someone attempts to skip a row then the actual error is with the previous cell and not the current cell which is contrary to what the standard error message implies.
Finally in the Data Validation dialog box verify that "Ignore blank" is not checked.
Here is dflak's formula with the "countif" addition if you decide you need it.I tried from this link [ . . . ] but it's [countif formula] not working.
Formula:Please Login or Register to view this content.
Last edited by GeoffW283; 01-02-2019 at 06:21 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks