Enable data entry in Excel cell only if a dependent cell is filled and then limit the entries to either 1 or 0

I know how to these two steps separately, but don't know how to combine them.

Ensuring a cell can be filled only if a dependent cell is filled can be achieved via inserting a =NOT(ISBLANK($A$1)) formula in the Data Validation prompt, as explained here.

Limiting a cell to two possible values can be done via 'Data Validation' as explained in the answers to this question.

But how can I combine these two features? I don't think one can have two data validation options on one same cell.


If you don’t need a drop-down list box, you can try a custom formula like: =AND((E1<>""),OR(F1=1,F1=0)).

enter image description here

If the action does not meet the conditions, you will get the following promp.

enter image description here