ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VLOOKUP WITH MACRO (https://www.excelbanter.com/excel-programming/398874-vlookup-macro.html)

yusuf

VLOOKUP WITH MACRO
 
How I can use the VLOOKUP function with Excel macro.
thanks

papou[_2_]

VLOOKUP WITH MACRO
 
Hello yusuf
You may use eiher:
Evaluate("=VLOOKUP(C3,A1:B5,2,FALSE)")
or
Application.WorksheetFunction.VLookup(Range("C3"), Range("A1:B5"), 2, False)

HTH
Cordially
Pascal


"yusuf" a écrit dans le message de news:
...
How I can use the VLOOKUP function with Excel macro.
thanks




yusuf

VLOOKUP WITH MACRO
 
Hi Papou
Thank you for helping me, I try to run the following macro but still give me
error please if you can help me in this matter.

Sub Test()
B2 = Application.WorksheetFunction.VLookup(Range("A:A") ,
Range("[bank_database.xls]Sheet1!$A:$B"), 2, False)
End Sub

thanks you
"papou" wrote:

Hello yusuf
You may use eiher:
Evaluate("=VLOOKUP(C3,A1:B5,2,FALSE)")
or
Application.WorksheetFunction.VLookup(Range("C3"), Range("A1:B5"), 2, False)

HTH
Cordially
Pascal


"yusuf" a écrit dans le message de news:
...
How I can use the VLOOKUP function with Excel macro.
thanks






All times are GMT +1. The time now is 10:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com