Forum Discussion
bpinter
Jul 26, 2021Copper Contributor
Need Help, Validate a cell vs a table
Hi, I will start out by saying… I’m using a live document, so I can’t use Macro/VBA. I want to use data validation to check another cells text against a table on another sheet. If the text matches ...
- Jul 26, 2021
bpinter I think this is what you want:
=COUNTIF(Sheet2!$A$2:$A$3,$B2)where Sheet2!$A$2:$A$3 is the range of the acceptable values and $B2 is the top row of the Task column.
mtarler
Jul 26, 2021Silver Contributor
bpinter I think this is what you want:
=COUNTIF(Sheet2!$A$2:$A$3,$B2)where Sheet2!$A$2:$A$3 is the range of the acceptable values and $B2 is the top row of the Task column.
bpinter
Jul 27, 2021Copper Contributor
- mtarlerJul 27, 2021Silver Contributorwell, I would say just uncheck the box in data validation that says "Ignore blank" but there appears to be a bug there. AND you should also know data validation only ACTS when the cell value is changed. So if you have a value already in the cell that doesn't meet the data validation (e.g. you added/changed the validation criteria or changed the values that the data validation is looking at to check if it is valid) then it will not send an alert even if you click on the cell and hit enter (i.e. without changing the value). But if you click on the cell and edit the value or even hit F2 to go into edit mode and then hit Enter it will give the error message BUT if you then hit Cancel or 'x' out of the warning it will return to the PREVIOUS value which was not technically valid. I believe this is all 'as designed' and limitations that must be accepted (as the alternatives could wreak havoc).
The 'bug' I mentioned is that by unchecking "Ignore blank" it appears to only 'half' work. IF you have a valid value in the cell and then clear the cell it appears to ignore the blank even with the checkbox unchecked. If you try to enter a wrong value it will give the alert (as expected) and then if you try to follow that up with a blank value then it will continue to give the alert (i.e. the unchecked ignore blank option works in this case).