changing the value of one cell using another cell

K

karlo

Hi, i dont know if this is possible
Im trying to make a search option in excel using VLOOKUP and withou
using controls.

Lets say A1 can either be "A" or "B" (using validation list)

if A1="A"
B1=" " (this is currently the search box)
B2=VLOOKUP(E1,R1:T7,2,FALSE) -simply a formula

now if A1="B"
B1=VLOOKUP(F1,G1:Y7,3,FALSE)
B2=" " (this is now the search box)

I dunno if its possible, and if it is what should i do? im not familia
with VB either
 
T

Trevor Shuttleworth

Not exactly sure what you are trying to do, but this might work:

B1:
=IF(A1="A",IF(ISNA(VLOOKUP(F1,G1:Y7,3,FALSE)),"",VLOOKUP(F1,G1:Y7,3,FALSE)),
"")
B2:
=IF(A1="B",IF(ISNA(VLOOKUP(E1,R1:T7,2,FALSE)),"",VLOOKUP(E1,R1:T7,2,FALSE)),
"")

Regards

Trevor
 
P

Paul

Not too sure on this one but if you want to change the
contents of B1 and B2 depending on the selection in A just
use a nested IF

B1=IF(A1=A, " ", VLOOKUP(E1,R1:T7,2,FALSE))
B2=IF(A1=A, VLOOKUP(E1,R1:T7,2,FALSE), " ")

Not too sure what you mean by "search box" so this may not
be what you are looking for.

Paul
 
Top