sheet to array.. vlookup vs. ???

rosado

New Member
Joined
Oct 24, 2006
Messages
13
hello, I would like to know if you can help me on this.

im using VBA on excel and wants to find a function that works like the vlookup() .. becuase if I try to use the =vlookup() in the subroutine it fail.

this is what I want to do:
I want to search a .value in a sheet phisicaly on another file.
i.e.

i want to search A1 (value "FL") in c:\states.xls[sheet1]... and get "Florida"

remember A1 is located in c:\test.xls and remember im not using the excel formulas, im using the VBA (alt+F11) to create a sub.

Omar.

thank you in advance very very much....
 

Some videos you may like

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Wolfshead

Board Regular
Joined
Oct 18, 2006
Messages
100
Hi
Provided the lookup workbook is open you can use vlookup, but need to begin with Application. - as in
VAR=Application.Vlookup(Range("A1"),RANGE("c2:D55"),2,FALSE)
Amend the references to suit.

Wolfshead
 

Watch MrExcel Video

Forum statistics

Threads
1,114,398
Messages
5,547,722
Members
410,809
Latest member
pieter89
Top