Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default File name in Vlookup


I am trying to do vlookup in a macro. Is there any way I can specify
table from a sheet in a workbook that is not open for second argumen
of vlookup?

For this format
ActiveCell.FormulaR1C1 = _

"=VLOOKUP(RC4,[current_file.xls]overall!R2C1:R1000C15,4,FALSE)"
I have to have current_file.xls open

It gave me errors when I tried this

ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC4,[E:\folder 1\folde
2\current_file.xls]overall!R2C1:R1000C15,4,FALSE)"

What is the correct syntax to specify this file in vlookup so that
dont have to have that file open?

Thanks,
Ja

--
sa0200
-----------------------------------------------------------------------
sa02000's Profile: http://www.excelforum.com/member.php...fo&userid=2774
View this thread: http://www.excelforum.com/showthread.php?threadid=47557

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default File name in Vlookup

I've had to use INDIRECT.EXT to get data from closed workbooks. I don't
know how it would work for your application.

http://xcell05.free.fr/english/index.html



"sa02000" wrote:


I am trying to do vlookup in a macro. Is there any way I can specify a
table from a sheet in a workbook that is not open for second argument
of vlookup?

For this format
ActiveCell.FormulaR1C1 = _

"=VLOOKUP(RC4,[current_file.xls]overall!R2C1:R1000C15,4,FALSE)"
I have to have current_file.xls open

It gave me errors when I tried this

ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC4,[E:\folder 1\folder
2\current_file.xls]overall!R2C1:R1000C15,4,FALSE)"

What is the correct syntax to specify this file in vlookup so that I
dont have to have that file open?

Thanks,
Jay


--
sa02000
------------------------------------------------------------------------
sa02000's Profile: http://www.excelforum.com/member.php...o&userid=27747
View this thread: http://www.excelforum.com/showthread...hreadid=475574


Reply
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 to txt file or database Lisa Excel Discussion (Misc queries) 5 May 7th 09 12:55 AM
using another file for vlookup dp New Users to Excel 2 August 28th 08 12:56 PM
Variabilize File Path or File Name in SumProduct (and Vlookup too) Mike H. Excel Worksheet Functions 2 January 7th 08 09:34 PM
vlookup file specification h2olawrence Excel Worksheet Functions 3 May 8th 05 05:39 PM
VLOOKUP from a file on another server Carole O Excel Worksheet Functions 2 January 14th 05 07:19 PM


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

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

About Us

"It's about Microsoft Excel"