Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JJC
 
Posts: n/a
Default worksheets lookups

I have a vlookup that goes out to another file.

Because the other file has several worksheets it is only searching on the
worksheet that was selected is there any way to get the vlookup to look at
all the worksheets within a workbook.

Here is my statement.
=VLOOKUP(A19,'[New Monthly Invoices June 05.xls]Aug 05'!$D$1:$S$2,16)

It works fine, but only for the Aug 05 Sheet within the other workbooks,
please help me to search the entire workbook for this.

Thanks,

JJC


  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

The only "error proof" way to do this is to write a separate lookup formula
for each sheet of the other file.

There is a method that uses the INDIRECT function but this is not error
proof! It requires the other file be open but as soon as you close the other
file and the active file recalculates you get errors.

There is also a VBA utility out there but a lot of people who try it also
seem to have problems using it.

Biff

"JJC" wrote in message
...
I have a vlookup that goes out to another file.

Because the other file has several worksheets it is only searching on the
worksheet that was selected is there any way to get the vlookup to look at
all the worksheets within a workbook.

Here is my statement.
=VLOOKUP(A19,'[New Monthly Invoices June 05.xls]Aug 05'!$D$1:$S$2,16)

It works fine, but only for the Aug 05 Sheet within the other workbooks,
please help me to search the entire workbook for this.

Thanks,

JJC




  #3   Report Post  
Harlan Grove
 
Posts: n/a
Default

JJC wrote...
I have a vlookup that goes out to another file.

Because the other file has several worksheets it is only searching on the
worksheet that was selected is there any way to get the vlookup to look at
all the worksheets within a workbook.

Here is my statement.
=VLOOKUP(A19,'[New Monthly Invoices June 05.xls]Aug 05'!$D$1:$S$2,16)

It works fine, but only for the Aug 05 Sheet within the other workbooks,
please help me to search the entire workbook for this.


If you're really using approximate matching (no 4th argument to
VLOOKUP), it's complicated. If this other worksheet has worksheet names
in MMM YY format, then use a defined name in the workbook containing
the formulas to generate a list of the worksheet names in the other
workbook IN REVERSE ORDER, e.g.,

WSLst referring to =TEXT(DATE(2005,13-ROW(INDIRECT("1:12")),1),"MMM
YY")

Then use array formulas like

=VLOOKUP(A19,INDIRECT("'[New Monthly Invoices June
05.xls]"&INDEX(WSLst,
MATCH(TRUE,COUNTIF(INDIRECT("'[New Monthly Invoices June 05.xls]"&WSLst
&"'!D1:D2"),"<="&A19)0,0))&"'!D1:S2"),16)

The workbook, New Monthly Invoices June 05.xls, *MUST* be open for this
to work.

  #4   Report Post  
Biff
 
Posts: n/a
Default

The workbook, New Monthly Invoices June 05.xls, *MUST* be open for this
to work.


And the formulas will crash as soon as the other workbook is closed and a
calc occurs in the active wb!

Users should be made aware of this significant drawback!

Biff

"Harlan Grove" wrote in message
oups.com...
JJC wrote...
I have a vlookup that goes out to another file.

Because the other file has several worksheets it is only searching on the
worksheet that was selected is there any way to get the vlookup to look at
all the worksheets within a workbook.

Here is my statement.
=VLOOKUP(A19,'[New Monthly Invoices June 05.xls]Aug 05'!$D$1:$S$2,16)

It works fine, but only for the Aug 05 Sheet within the other workbooks,
please help me to search the entire workbook for this.


If you're really using approximate matching (no 4th argument to
VLOOKUP), it's complicated. If this other worksheet has worksheet names
in MMM YY format, then use a defined name in the workbook containing
the formulas to generate a list of the worksheet names in the other
workbook IN REVERSE ORDER, e.g.,

WSLst referring to =TEXT(DATE(2005,13-ROW(INDIRECT("1:12")),1),"MMM
YY")

Then use array formulas like

=VLOOKUP(A19,INDIRECT("'[New Monthly Invoices June
05.xls]"&INDEX(WSLst,
MATCH(TRUE,COUNTIF(INDIRECT("'[New Monthly Invoices June 05.xls]"&WSLst
&"'!D1:D2"),"<="&A19)0,0))&"'!D1:S2"),16)

The workbook, New Monthly Invoices June 05.xls, *MUST* be open for this
to work.



  #5   Report Post  
Harlan Grove
 
Posts: n/a
Default

Biff wrote...
The workbook, New Monthly Invoices June 05.xls, *MUST* be open for this
to work.


And the formulas will crash as soon as the other workbook is closed and a
calc occurs in the active wb!

Users should be made aware of this significant drawback!

....

In Excel 2002, if the other workbook isn't open, my formula returns
#REF!. While I wasn't explicit about how the formula wouldn't work, I
was clear than it wouldn't if the other file weren't open.

By 'the formulas will crash', did you mean something other than
returning a #REF! error?



  #6   Report Post  
Biff
 
Posts: n/a
Default

By 'the formulas will crash', did you mean something other than
returning a #REF! error?


No. I consider #REF! a "crash".

Biff

"Harlan Grove" wrote in message
oups.com...
Biff wrote...
The workbook, New Monthly Invoices June 05.xls, *MUST* be open for this
to work.


And the formulas will crash as soon as the other workbook is closed and a
calc occurs in the active wb!

Users should be made aware of this significant drawback!

...

In Excel 2002, if the other workbook isn't open, my formula returns
#REF!. While I wasn't explicit about how the formula wouldn't work, I
was clear than it wouldn't if the other file weren't open.

By 'the formulas will crash', did you mean something other than
returning a #REF! error?



  #7   Report Post  
Harlan Grove
 
Posts: n/a
Default

Biff wrote...
By 'the formulas will crash', did you mean something other than
returning a #REF! error?


No. I consider #REF! a "crash".

....

That's nice. I consider an application error leading to unrecoverable
data loss a crash. #REF! is just an error message, like #VALUE! or
#NAME?.

So what wasn't sufficient about my caveat:

The workbook, New Monthly Invoices June 05.xls, *MUST* be open for this
to work.


?

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
Lookups across worksheets sixpence668 New Users to Excel 3 July 23rd 05 12:50 AM
Merge Worksheets Mark Jackson Excel Discussion (Misc queries) 1 June 9th 05 10:39 AM
Spawning worksheets and a summary per worksheet username Excel Discussion (Misc queries) 0 May 23rd 05 09:57 PM
Copying data within worksheets with lookups MAWII Excel Discussion (Misc queries) 4 April 26th 05 07:23 PM
HELP! How do you--> Lock a set of rows but also link worksheets to FRUSTRATED Excel Discussion (Misc queries) 6 December 29th 04 10:05 PM


All times are GMT +1. The time now is 06:24 AM.

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"