Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Vlookup, table array is referenced in another cell

This shouldn't be this difficult I feel!

I am trying to do a basic Vlookup, referencing an array and returning a
specific value. The trick is the location of the array is in a
different excel workbook, which is defined in a seperate cell.

In cell A1 lies the path of the workbook as well as the sheet name and
array info

A1='\\server\sharedfolder\[LCV.xls]QTR'!H:I

In cell A2 is the lookup, which searches for the value "25th" in the
range defined in cell A1, and returns the value in the second column.

A2=VLOOKUP("25th",A1,2,FALSE)

The problem is, this doesn't work, it won't accept what I have in A1 as
a range, I have tried messing with the single quotes and a few other
format type things in A1, but cannot get this to work.

This does work

=VLOOKUP("25th",'\\server\sharedfolder\[LCV.xls]QTR'!H:I,2,FALSE)

so I know my array is correct.

Please HELP!

Ed


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Vlookup, table array is referenced in another cell

Hi
unfortunately neither INDIRECT nor INDIRECT.EXT (from the add-in
morefunc.xll) will work in this case as
- the other workbook is closed AND
- you need an array returned from the close workbook

Have a look at http://tinyurl.com/2c62u
for further alternatives. Note: They will probably be quite slow so you
may consider the following workaround:
- 'mirror' the cells with INDIRECT.EXT (also described in the link from
above) on a separate sheet in your workbook
- use VLOOKUP on this mirrored sheet
Though this could also be quite slow

Besides these formula solutions you may consider using VBA (though this
also has to access the closed workbook)


--
Regards
Frank Kabel
Frankfurt, Germany

This shouldn't be this difficult I feel!

I am trying to do a basic Vlookup, referencing an array and returning
a specific value. The trick is the location of the array is in a
different excel workbook, which is defined in a seperate cell.

In cell A1 lies the path of the workbook as well as the sheet name

and
array info

A1='\\server\sharedfolder\[LCV.xls]QTR'!H:I

In cell A2 is the lookup, which searches for the value "25th" in the
range defined in cell A1, and returns the value in the second column.

A2=VLOOKUP("25th",A1,2,FALSE)

The problem is, this doesn't work, it won't accept what I have in A1
as a range, I have tried messing with the single quotes and a few
other format type things in A1, but cannot get this to work.

This does work

=VLOOKUP("25th",'\\server\sharedfolder\[LCV.xls]QTR'!H:I,2,FALSE)

so I know my array is correct.

Please HELP!

Ed


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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Vlookup, table array is referenced in another cell

Untested, but try substituting INDIRECT(A1) for A1.

Alan Beban

edsox5 < wrote:
This shouldn't be this difficult I feel!

I am trying to do a basic Vlookup, referencing an array and returning a
specific value. The trick is the location of the array is in a
different excel workbook, which is defined in a seperate cell.

In cell A1 lies the path of the workbook as well as the sheet name and
array info

A1='\\server\sharedfolder\[LCV.xls]QTR'!H:I

In cell A2 is the lookup, which searches for the value "25th" in the
range defined in cell A1, and returns the value in the second column.

A2=VLOOKUP("25th",A1,2,FALSE)

The problem is, this doesn't work, it won't accept what I have in A1 as
a range, I have tried messing with the single quotes and a few other
format type things in A1, but cannot get this to work.

This does work

=VLOOKUP("25th",'\\server\sharedfolder\[LCV.xls]QTR'!H:I,2,FALSE)

so I know my array is correct.

Please HELP!

Ed


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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default Vlookup, table array is referenced in another cell

Did the OP indicate that the other workbook is closed?

Alan Beban

Frank Kabel wrote:
Hi
unfortunately neither INDIRECT nor INDIRECT.EXT (from the add-in
morefunc.xll) will work in this case as
- the other workbook is closed AND
- you need an array returned from the close workbook

Have a look at http://tinyurl.com/2c62u
for further alternatives. Note: They will probably be quite slow so you
may consider the following workaround:
- 'mirror' the cells with INDIRECT.EXT (also described in the link from
above) on a separate sheet in your workbook
- use VLOOKUP on this mirrored sheet
Though this could also be quite slow

Besides these formula solutions you may consider using VBA (though this
also has to access the closed workbook)


--
Regards
Frank Kabel
Frankfurt, Germany


This shouldn't be this difficult I feel!

I am trying to do a basic Vlookup, referencing an array and returning
a specific value. The trick is the location of the array is in a
different excel workbook, which is defined in a seperate cell.

In cell A1 lies the path of the workbook as well as the sheet name


and

array info

A1='\\server\sharedfolder\[LCV.xls]QTR'!H:I

In cell A2 is the lookup, which searches for the value "25th" in the
range defined in cell A1, and returns the value in the second column.

A2=VLOOKUP("25th",A1,2,FALSE)

The problem is, this doesn't work, it won't accept what I have in A1
as a range, I have tried messing with the single quotes and a few
other format type things in A1, but cannot get this to work.

This does work

=VLOOKUP("25th",'\\server\sharedfolder\[LCV.xls]QTR'!H:I,2,FALSE)

so I know my array is correct.

Please HELP!

Ed


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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Vlookup, table array is referenced in another cell

Hi Alan
this probably won't work as (due to the path definition) the other
workbook seems to be closed - INDIRECT will return an error

--
Regards
Frank Kabel
Frankfurt, Germany

Alan Beban wrote:
Untested, but try substituting INDIRECT(A1) for A1.

Alan Beban

edsox5 < wrote:
This shouldn't be this difficult I feel!

I am trying to do a basic Vlookup, referencing an array and
returning a specific value. The trick is the location of the array
is in a different excel workbook, which is defined in a seperate
cell.

In cell A1 lies the path of the workbook as well as the sheet name
and array info

A1='\\server\sharedfolder\[LCV.xls]QTR'!H:I

In cell A2 is the lookup, which searches for the value "25th" in the
range defined in cell A1, and returns the value in the second

column.

A2=VLOOKUP("25th",A1,2,FALSE)

The problem is, this doesn't work, it won't accept what I have in A1
as a range, I have tried messing with the single quotes and a few
other format type things in A1, but cannot get this to work.

This does work

=VLOOKUP("25th",'\\server\sharedfolder\[LCV.xls]QTR'!H:I,2,FALSE)

so I know my array is correct.

Please HELP!

Ed


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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Vlookup, table array is referenced in another cell

Hi Alan
just a 'good' guess on my side as he has defined the full path
information. If the other workbook is open this is not required.
But you're right, if the WB is open INDIRECT will work. I should have
stated that this was my assumption :-)

--
Regards
Frank Kabel
Frankfurt, Germany

Alan Beban wrote:
Did the OP indicate that the other workbook is closed?

Alan Beban

Frank Kabel wrote:
Hi
unfortunately neither INDIRECT nor INDIRECT.EXT (from the add-in
morefunc.xll) will work in this case as
- the other workbook is closed AND
- you need an array returned from the close workbook

Have a look at http://tinyurl.com/2c62u
for further alternatives. Note: They will probably be quite slow so
you may consider the following workaround:
- 'mirror' the cells with INDIRECT.EXT (also described in the link
from above) on a separate sheet in your workbook
- use VLOOKUP on this mirrored sheet
Though this could also be quite slow

Besides these formula solutions you may consider using VBA (though
this also has to access the closed workbook)


--
Regards
Frank Kabel
Frankfurt, Germany


This shouldn't be this difficult I feel!

I am trying to do a basic Vlookup, referencing an array and
returning a specific value. The trick is the location of the array
is in a different excel workbook, which is defined in a seperate
cell.

In cell A1 lies the path of the workbook as well as the sheet name


and

array info

A1='\\server\sharedfolder\[LCV.xls]QTR'!H:I

In cell A2 is the lookup, which searches for the value "25th" in

the
range defined in cell A1, and returns the value in the second
column.

A2=VLOOKUP("25th",A1,2,FALSE)

The problem is, this doesn't work, it won't accept what I have in

A1
as a range, I have tried messing with the single quotes and a few
other format type things in A1, but cannot get this to work.

This does work

=VLOOKUP("25th",'\\server\sharedfolder\[LCV.xls]QTR'!H:I,2,FALSE)

so I know my array is correct.

Please HELP!

Ed


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


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Vlookup, table array is referenced in another cell

Thanks for all your help everyone, downloading the Excel Add-In an
using the INDIRECT.EXT allowed me to do what I needed, it's powerfu
stuff!

Thanks for all your help!

E

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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Vlookup, table array is referenced in another cell

"Alan Beban" wrote...
Did the OP indicate that the other workbook is closed?

...

As Frank has already pointed out, the full path isn't required when the workbook
is open. Did the OP's use of the full path raise any red flags for you?

Actually the OP stated:

"This does work

=VLOOKUP("25th",'\\server\sharedfolder\[LCV.xls]QTR'!H:I,2,FALSE)"

Taking the OP at face value (which you've been known to do in other threads),
the formula above could only be stored as such in Excel if the workbook were
closed; otherwise, Excel would have converted the formula to

=VLOOKUP("25th",[LCV.xls]QTR!H:I,2,FALSE)

Logical inference is a powerful skill, once developed. You should try it
sometime.

--
To top-post is human, to bottom-post and snip is sublime.
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 , Referencing a cell to refence table array seans Excel Worksheet Functions 7 November 22nd 08 07:32 AM
Replacing a Table-array with a cell reference in vlookup Allan Excel Worksheet Functions 4 January 15th 08 01:57 PM
use cell reference,whose contents= a table array name for Vlookup Sonic Excel Worksheet Functions 2 March 27th 06 08:29 AM
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
How to use a cell value as Table Array in VLOOKUP worksheet function willydlish Excel Discussion (Misc queries) 2 February 16th 05 02:47 AM


All times are GMT +1. The time now is 05:17 PM.

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"