Forum Discussion
DMac6160
Nov 02, 2024Copper Contributor
Conditional Data Validation
Hello: I'm hoping the Excel user community can help me with a question. I have a worksheet that contains a drop-down list in Column B. Available values are ATM, CHK, DEP, and EBT. I would like to...
HansVogelaar
Nov 02, 2024MVP
Let's say you want to apply this to C2:C100.
Select this range, C2 should be the active cell in the selection.
Set the number format to the custom format 0000
On the Data tab of the ribbon, click Data Validation.
Select Custom from the Allow list, then enter the following formula:
=OR(B2<>"CHK", AND(C2>=0, C2<=9999, MOD(C2, 1)=0))
If you wish, enter messages in the Input Message and Error Alert tabs, then click OK.