LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default call VLOOKUP from Macro with Variables

Dear Friends,

I want to call VLOOKUP from a macro as follows

ActiveCell.FormulaR1C1 = _
"=VLOOKUP(name1,'[file2]sheet2'!name2:name3,5,0)"

where

name1 - is the reference name of the values in file 1 (active)
file2 - is the variable that contains the name of the file I want t
get the values
sheet2 - is the variable that contains the name of the sheet of file2
name2:name3 - is the table of [file2]sheet2 where name2, name3 ar
declared reference names

What is the correct way to call this function?

Thanks,
G

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup & 2 variables Marti Excel Worksheet Functions 3 June 4th 09 09:32 PM
How can run a macro ( call a macro) on selection of any filtercriteria? [email protected] Excel Worksheet Functions 7 February 20th 09 12:34 AM
Vlookup Encounters a call with no data and returns #N/A Six Sigma Blackbelt Excel Discussion (Misc queries) 11 October 16th 08 11:07 PM
Call an Access macro from an Excel macro Jason W Excel Discussion (Misc queries) 1 May 1st 08 08:33 PM
Call a Visual Basic Function with VLookup ajd Excel Worksheet Functions 10 December 18th 07 03:40 AM


All times are GMT +1. The time now is 02:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"