Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / April 2007

Tip: Looking for answers? Try searching our database.

How to convert text into range reference?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
McGonnagal - 30 Apr 2007 20:24 GMT
The basic description of the problem is that I have data scattered in a bunch
of date-named files, and I am trying to assemble them back into the same
table using VLOOKUP function, where I have to change the workbook source
names - and I am getting an error, indicating that my reference is a text
string (which it is), not the proper reference.

Example:

What it should be:
A1= '11-20 (date)
B1= 'C:\Folder\11-20 sales.xls'!data$A$1:$D$35 (reference text as a result
of a formula)

C1=vlookup(A1,indirect(B1),false,2) - ref error

When I tried to concantinate the reference in the vlookup formula itself I
got value error from inability to convert text into reference link, like this:
vlookup(A1,"'C:\Folder\11-20 sales.xls'!data$A$1:$D$35",false,2)

Appreciate your help,

PS I am not good with VB.
Peo Sjoblom - 30 Apr 2007 20:33 GMT
The other workbook needs to be open or else INDIRECT will not work

You can download morefunc (which is an Excel add-in) from here, it has a
function called INDIRECT.EXT which will work on closed workbooks

http://xcell05.free.fr/

Signature

Regards,

Peo Sjoblom

> The basic description of the problem is that I have data scattered in a
> bunch
[quoted text clipped - 20 lines]
>
> PS I am not good with VB.
McGonnagal - 30 Apr 2007 20:52 GMT
Workbook was open :-(

> The other workbook needs to be open or else INDIRECT will not work
>
[quoted text clipped - 27 lines]
> >
> > PS I am not good with VB.
Peo Sjoblom - 30 Apr 2007 21:10 GMT
Then there is no need for a path, try this formula

=VLOOKUP(A1,INDIRECT("'"&A2),2,0)

and change the value in A2 to

[11-20 sales.xls]data'!$A$1:$D$35

no leading apostrophe

your vlookup had the wrong syntax as well

Signature

Regards,

Peo Sjoblom

> Workbook was open :-(
>
[quoted text clipped - 35 lines]
>> >
>> > PS I am not good with VB.
McGonnagal - 30 Apr 2007 21:02 GMT
OK, I found it - Excel ate up the first '....

> The other workbook needs to be open or else INDIRECT will not work
>
[quoted text clipped - 27 lines]
> >
> > PS I am not good with VB.
McGonnagal - 30 Apr 2007 20:44 GMT
correction: I did use correct spelling for the link:
'C:\Folder\[11-20 sales.xls]data'!$A$1:$D$35

Formula using Indirect() works in the same file (different worksheet), but
not outside of the workbook... grh....

> The basic description of the problem is that I have data scattered in a bunch
> of date-named files, and I am trying to assemble them back into the same
[quoted text clipped - 18 lines]
>
> PS I am not good with VB.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.