Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Using linked workbook as a parameter in a user defined function

I have created a function that needs a range as an
argument. It is similar to the VLOOKUP function, except
it can use more than one column as it's search key.
Anyway, when I call the function in a cell, and I use an
external reference to another workbook, it gives me
#VALUE!. If I have the external workbook open it works
fine, but as soon as I close it, and the argument in the
formula changes to the full path name of the file, it
fails. How can I use a full path name as a range argument
in a user defined function?

Thanx!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default Using linked workbook as a parameter in a user defined function

Hi Michael,

How can I use a full path name as a range argument
in a user defined function


You could try putting the link in another cell and reference that cell
in the call to the udf. Another option is to define a name that refers
to the other workbook and use that name in the call to the udf.
e.g. :

Insert, name, define

Name: ExternalLink
Refersto:='c:\data\[test.xls]Sheet1'!$A$1:$c$4

Then in another cell:

=YourUDF(ExternalLink,Otherargs)

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com

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
user defined function ub Excel Worksheet Functions 6 April 4th 07 09:42 PM
vlookup, add parameter, on error return user defined value jims2994 Excel Worksheet Functions 0 July 7th 06 02:56 PM
Opening workbook in user-defined folder pdberger Excel Worksheet Functions 0 August 26th 05 04:09 PM
user defined function Brian Rogge Excel Worksheet Functions 5 May 23rd 05 06:21 PM
User-Defined Function pre-empting Built-in Function? How to undo???? MarWun Excel Programming 1 August 6th 03 09:31 PM


All times are GMT +1. The time now is 11:40 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"