For in VBA Matrix

3

I have a database composed of two vectors: u=(a,b,c) and v=(1,2,3) In another worksheet, I have two blank vectors x and y . I need to complete the input of x (from u ), the code returns the corresponding entry from v to x .

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

Thank you!

    
asked by anonymous 01.07.2015 / 02:04

1 answer

1

Create a database eg:

A1 B1
x   1
y   2
z   3

In A1 create a data type validation list:

=$A$2:$A$4

Go to the Formulas tab, Name Manager:

  

new: x refers to B2

     

new: y refers to B3

     

new: z refers to B4

In B1 create Data Type Validation:

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

Ready, whatever you choose in A1, will be the corresponding option in B1. but not necessarily A1 should be dropdown list, just in case you ensure that the A1 value will have corresponding in B1.

If you do this for vba it will be very long.

    
09.02.2016 / 23:57