ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Integrate a Vlookup function in to a macro (https://www.excelbanter.com/excel-discussion-misc-queries/138778-integrate-vlookup-function-macro.html)

Arain

Integrate a Vlookup function in to a macro
 
I have no clue how to add this vlookup function to a macro.

The formula is
=VLOOKUP(A6,'[Commissions Master
Summary2007-04-04-08-30-25.xls]Sheet1'!$1:$65536,11,FALSE)

Its working great if I keep copy pasting the formula but I want to take it a
step ahead and automate it.

Barb Reinhardt

Integrate a Vlookup function in to a macro
 
Try recording a macro when you enter it and then take a look at the result.

"Arain" wrote:

I have no clue how to add this vlookup function to a macro.

The formula is
=VLOOKUP(A6,'[Commissions Master
Summary2007-04-04-08-30-25.xls]Sheet1'!$1:$65536,11,FALSE)

Its working great if I keep copy pasting the formula but I want to take it a
step ahead and automate it.


[email protected]

Integrate a Vlookup function in to a macro
 
On Apr 12, 6:16 pm, Arain wrote:
I have no clue how to add this vlookup function to a macro.

The formula is
=VLOOKUP(A6,'[Commissions Master
Summary2007-04-04-08-30-25.xls]Sheet1'!$1:$65536,11,FALSE)

Its working great if I keep copy pasting the formula but I want to take it a
step ahead and automate it.


Part of the recording of your macro should be typing vlookup formula.
It will work.. I've done it many time myself.
When you run your macro, make sure that the file that's being
referenced in the vlookup formula is already opened. It will make
your macro run quicker.


Billy Liddel

Integrate a Vlookup function in to a macro
 
It is c.formula "=VLOOKUP(A6,'[Commissions Master
Summary2007-04-04-08-30-25.xls]Sheet1'!$1:$65536,11,FALSE)"

or cells(i,j).formula = "=VLOOKUP(A6,'[Commissions Master
Summary2007-04-04-08-30-25.xls]Sheet1'!$1:$65536,11,FALSE)"

Regards
Peter

" wrote:

On Apr 12, 6:16 pm, Arain wrote:
I have no clue how to add this vlookup function to a macro.

The formula is
=VLOOKUP(A6,'[Commissions Master
Summary2007-04-04-08-30-25.xls]Sheet1'!$1:$65536,11,FALSE)

Its working great if I keep copy pasting the formula but I want to take it a
step ahead and automate it.


Part of the recording of your macro should be typing vlookup formula.
It will work.. I've done it many time myself.
When you run your macro, make sure that the file that's being
referenced in the vlookup formula is already opened. It will make
your macro run quicker.




All times are GMT +1. The time now is 04:44 AM.

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