# Limit data entry into one of two cells and restrict to one value in one of the cells

#### John EPC

##### New Member
Here is what works for the first part: to allow entry into cell A1 only if Cell A2 is blank or opposite. Leave user of spreadsheet with choice of cells to enter but not allow entry into both.

select cell A1, go to data > validation

select custom, in formula type;

=IF(A2="",TRUE,FALSE)

and in A2 do the same but change the formula to;
=IF(A1="",TRUE,FALSE)

How do I go about adding limit value to cell A1 to 143? Hopefully, it can be done by adding to the formula used in cell A1 in Data Validation. If it can not be done that way, how can it be done using Visual Basic for Applications?

Thanks, John

### Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Replies
5
Views
136
Replies
3
Views
86
Replies
2
Views
99
Replies
0
Views
92
Replies
0
Views
45

1,187,001
Messages
5,961,057
Members
438,516
Latest member
Fintrics

### 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.

### Which adblocker are you using?

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

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