beachie2037
New Member
- Joined
- Jan 6, 2005
- Messages
- 21
Hi,
I have an array of data thats being called in a macro. Is it possible to run a vlookup in the macro array based on a cell refence on the page. Basically I want to use the customer number to reference a cell of data (customer name) that will be on a row corresponding to the cell reference.
See below for example of what I WOULD LIKE TO DO
Dim EditCust(3)
EditCust(0) = Range("A1")
EditCust(1) = VLOOKUP(A1,CustomerDB!A5:D7,2,FALSE)
EditCust(2) = Range("A3")
Obviously this doesnt work - is it possible to do what I want to do?
ANy help appreciated.
Steve
I have an array of data thats being called in a macro. Is it possible to run a vlookup in the macro array based on a cell refence on the page. Basically I want to use the customer number to reference a cell of data (customer name) that will be on a row corresponding to the cell reference.
See below for example of what I WOULD LIKE TO DO
Dim EditCust(3)
EditCust(0) = Range("A1")
EditCust(1) = VLOOKUP(A1,CustomerDB!A5:D7,2,FALSE)
EditCust(2) = Range("A3")
Obviously this doesnt work - is it possible to do what I want to do?
ANy help appreciated.
Steve