Reputation: 1
I have a formula
=IF(OR(A_1="B",A_1="C",A_1="D",A_1="S"),TRUE,FALSE)
That formula needs to search A_1:E_6 but not all at once. I need to be able to have like a drop down menu or a list that allows me to choose the cell from A_1 to E_6 so it searches that specific cell if it contains B, C, D or S.
I need it for a game of battleships I am trying to make in my ICT course.
Upvotes: 0
Views: 48
Reputation: 1215
Assuming that A_1:E_6 means the range of cells A1:E6, try replacing your formula with this:
=OR(INDIRECT($A$10)="B",INDIRECT($A$10)="C",INDIRECT($A$10)="D",INDIRECT($A$10)="S")
And putting a data validation list in cell A10 with the following list:
A1,A2,A3,A4,A5,A6,B1,B2,B3,B4,B5,B6,C1,C2,C3,C4,C5,C6,D1,D2,D3,D4,D5,D6,E1,E2,E3,E4,E5,E6
You can move it from cell A10 to wherever you need.
Upvotes: 2