Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Laura
 
Posts: n/a
Default vlookup multiple worksheets

I'm in over my head. Any help would be appreciated.

I have a workbook with 11 worksheets. I need to look for a value in column
A within the first 10 worksheets and return the corresponding value from
column F to worksheet number 11. Column A contains both text and numbers.

Column A Column F
Product Units
5 200
1 100
3 12
7 50

The numbers in column A are indexes from drop down boxes.

Please let me know if you need further info. Thank you for any help you can
give.

Laura
  #2   Report Post  
Domenic
 
Posts: n/a
Default

Assuming that B1 on Sheet11 contains your lookup value, and Sheet1
through Sheet10 contain your lookup tables, try...

=VLOOKUP(B1,INDIRECT("Sheet"&MATCH(TRUE,COUNTIF(IN DIRECT("Sheet"&ROW(INDI
RECT("1:10"))&"!A2:A100"),B1)0,0)&"!A2:F100"),6,0 )

or

=VLOOKUP(B1,INDIRECT("'"&INDEX($A$1:$A$10,MATCH(TR UE,COUNTIF(INDIRECT("'"
&$A$1:$A$10&"'!A2:A100"),B1)0,0))&"'!A2:F100"),6, 0)

....where A1:A10 on Sheet11 contains your list of sheet names. Both
formulas need to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER.
Adjust the ranges (A2:A100 and A2:F100) accordingly.

Hope this helps!

In article ,
"Laura" wrote:

I'm in over my head. Any help would be appreciated.

I have a workbook with 11 worksheets. I need to look for a value in column
A within the first 10 worksheets and return the corresponding value from
column F to worksheet number 11. Column A contains both text and numbers.

Column A Column F
Product Units
5 200
1 100
3 12
7 50

The numbers in column A are indexes from drop down boxes.

Please let me know if you need further info. Thank you for any help you can
give.

Laura

  #3   Report Post  
Laura
 
Posts: n/a
Default

Domenic:

Thanks for your reply. As I mentioned, this is over my head. My function
experience has been limited to IF statements. In the first formula, is
"Sheet" a range name? My lookup value is the index number 1 which could be
on any sheet 1-10 and the tables are in sheets 1 - 10. I tried the first
formula and received #N/A. I will try the second formula and check back with
you.

Thanks again,
Laura

"Domenic" wrote:

Assuming that B1 on Sheet11 contains your lookup value, and Sheet1
through Sheet10 contain your lookup tables, try...

=VLOOKUP(B1,INDIRECT("Sheet"&MATCH(TRUE,COUNTIF(IN DIRECT("Sheet"&ROW(INDI
RECT("1:10"))&"!A2:A100"),B1)0,0)&"!A2:F100"),6,0 )

or

=VLOOKUP(B1,INDIRECT("'"&INDEX($A$1:$A$10,MATCH(TR UE,COUNTIF(INDIRECT("'"
&$A$1:$A$10&"'!A2:A100"),B1)0,0))&"'!A2:F100"),6, 0)

....where A1:A10 on Sheet11 contains your list of sheet names. Both
formulas need to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER.
Adjust the ranges (A2:A100 and A2:F100) accordingly.

Hope this helps!

In article ,
"Laura" wrote:

I'm in over my head. Any help would be appreciated.

I have a workbook with 11 worksheets. I need to look for a value in column
A within the first 10 worksheets and return the corresponding value from
column F to worksheet number 11. Column A contains both text and numbers.

Column A Column F
Product Units
5 200
1 100
3 12
7 50

The numbers in column A are indexes from drop down boxes.

Please let me know if you need further info. Thank you for any help you can
give.

Laura


  #4   Report Post  
Domenic
 
Posts: n/a
Default

In article ,
"Laura" wrote:

Domenic:

Thanks for your reply.


You're very welcome!

In the first formula, is "Sheet" a range name?


No, it's used to reference your 10 worksheets.

My lookup value is the index number 1 which could be
on any sheet 1-10 and the tables are in sheets 1 - 10.


Can you confirm the range for your lookup table? Also, are they all
located in the same columns for each worksheet?

I tried the first
formula and received #N/A. I will try the second formula and check back with
you.


If your sheets 1 - 10 are named Sheet1, Sheet2, Sheet3, through Sheet10,
then the first formula would suffice.
  #5   Report Post  
Laura
 
Posts: n/a
Default

YES!!!!! The first formula worked! Someday I'll understand what happened.

Thanks again,
Laura

"Domenic" wrote:

In article ,
"Laura" wrote:

Domenic:

Thanks for your reply.


You're very welcome!

In the first formula, is "Sheet" a range name?


No, it's used to reference your 10 worksheets.

My lookup value is the index number 1 which could be
on any sheet 1-10 and the tables are in sheets 1 - 10.


Can you confirm the range for your lookup table? Also, are they all
located in the same columns for each worksheet?

I tried the first
formula and received #N/A. I will try the second formula and check back with
you.


If your sheets 1 - 10 are named Sheet1, Sheet2, Sheet3, through Sheet10,
then the first formula would suffice.



  #6   Report Post  
Laura
 
Posts: n/a
Default

Domenic:

Sorry to bother you again, but I have one more question. How do I keep the
formula from returning #N/A when the value is not found?

Thanks,
Laura

"Domenic" wrote:

In article ,
"Laura" wrote:

Domenic:

Thanks for your reply.


You're very welcome!

In the first formula, is "Sheet" a range name?


No, it's used to reference your 10 worksheets.

My lookup value is the index number 1 which could be
on any sheet 1-10 and the tables are in sheets 1 - 10.


Can you confirm the range for your lookup table? Also, are they all
located in the same columns for each worksheet?

I tried the first
formula and received #N/A. I will try the second formula and check back with
you.


If your sheets 1 - 10 are named Sheet1, Sheet2, Sheet3, through Sheet10,
then the first formula would suffice.

  #7   Report Post  
Domenic
 
Posts: n/a
Default

In article ,
"Laura" wrote:

Domenic:

Sorry to bother you again, but I have one more question.


No problem...

How do I keep the formula from returning #N/A when the value is not

found?

One option...

Enter the following formula in a cell, let's say C1:

=SUMPRODUCT(COUNTIF(INDIRECT("Sheet"&ROW(INDIRECT( "1:10"))&"!A2:A100"),B1
))

....where B1 contains your lookup value.

Enter the following formula in another cell, let's say D1:

=IF(N(C1),VLOOKUP(B1,INDIRECT("Sheet"&MATCH(TRUE,C OUNTIF(INDIRECT("Sheet"
&ROW(INDIRECT("1:10"))&"!A2:A100"),B1)0,0)&"!A2:F 100"),6,0),"")

....confirmed with CONTROL+SHIFT+ENTER.

Another option...

Use conditional formatting to hide the errors. Assuming that the
formula is entered in D1:

1) Select D1

2) Format Conditional Formatting Formula Is

3) Enter the following formula:

=ISNA(D1)

4) Choose 'White' as your font colour

5) Click Ok

Hope this helps!
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
Adding multiple worksheets Craig Excel Worksheet Functions 1 July 6th 05 07:21 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
VLOOKUP Function using multiple worksheets Fiona Excel Discussion (Misc queries) 1 March 10th 05 08:55 AM
VLOOKUP Function using multiple worksheets Fiona Excel Discussion (Misc queries) 0 March 10th 05 05:24 AM
vlookup over multiple worksheets Neil Excel Worksheet Functions 3 December 16th 04 08:19 PM


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