array – Go to VBA Matrix

Question:

I have a database composed of two vectors: u=(a,b,c) and v=(1,2,3) In another spreadsheet, I have two blank vectors x and y . I need that when I complete an entry from x (coming from u ), the code will return the corresponding entry from v to x .

For example, if x = (b,c,b) , then y =(2,3,2)

Thanks!

Answer:

Create a database eg:

A1 B1
x   1
y   2
z   3

In A1 create a list type data validation:

=$A$2:$A$4

Go to Formulas tab, Name Manager:

new: x refers to B2

new: y refers to B3

new: z refers to B4

in B1 create List type data validation:

=Indireto(substituir(A1;"_";" ")

Okay, what you choose in A1, will be the corresponding option in B1. but not necessarily A1 must be drop-down list, just in case you guarantee that the value of A1 will match in B1.

If you are going to do this through vba will be too long.

Scroll to Top