#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Embedded lookup

Can a lookup be embedded in another lookup? A file has separate sheets for
each month with identical formats. A file has 13 sheets, one for each month
and a YTD sheet. Each sheet has P&L data for multiple companies and the YTD
sheet has a data entry field to identify the current month. Based on the
value in that field, the lookup function should, first, go to the correct
month's sheet, then lookup the correct value. Ex: YTD Cell A1=4 for April;
All sheets Cell A3=Sales; Col B = ABC, Inc. The lookup formula will lookup
A1, go to the April sheet, then perform the lookup function.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 457
Default Embedded lookup

Take a look at using the INDIRECT function, perhaps something like:

=VLOOKUP(A3,INDIRECT("'"&A1&"'!A:B),2,FALSE)

--
Best Regards,

Luke M
"HotaG" wrote in message
...
Can a lookup be embedded in another lookup? A file has separate sheets for
each month with identical formats. A file has 13 sheets, one for each
month
and a YTD sheet. Each sheet has P&L data for multiple companies and the
YTD
sheet has a data entry field to identify the current month. Based on the
value in that field, the lookup function should, first, go to the correct
month's sheet, then lookup the correct value. Ex: YTD Cell A1=4 for
April;
All sheets Cell A3=Sales; Col B = ABC, Inc. The lookup formula will
lookup
A1, go to the April sheet, then perform the lookup function.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default Embedded lookup

Modified to allow numeric value for month in A1:

=VLOOKUP(A3,INDIRECT("'"&LOOKUP(A1,{1,2,3,4,5,6,7, 8,9,10,11,12},
{"January","February","March","April","May","June" ,
"July","August","September","October","November"," December"})&
"'!A:B),2,FALSE)



"Luke M" wrote in message
.. .
Take a look at using the INDIRECT function, perhaps something like:

=VLOOKUP(A3,INDIRECT("'"&A1&"'!A:B),2,FALSE)

--
Best Regards,

Luke M
"HotaG" wrote in message
...
Can a lookup be embedded in another lookup? A file has separate sheets
for
each month with identical formats. A file has 13 sheets, one for each
month
and a YTD sheet. Each sheet has P&L data for multiple companies and the
YTD
sheet has a data entry field to identify the current month. Based on the
value in that field, the lookup function should, first, go to the correct
month's sheet, then lookup the correct value. Ex: YTD Cell A1=4 for
April;
All sheets Cell A3=Sales; Col B = ABC, Inc. The lookup formula will
lookup
A1, go to the April sheet, then perform the lookup function.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default Embedded lookup

Erm, got a bit carried away there, try this instead:


=VLOOKUP(A3,INDIRECT("'"&TEXT(DATE(2010,A1,1),"mmm m")&
"'!A:B),2,FALSE)




"Steve Dunn" wrote in message
...
Modified to allow numeric value for month in A1:

=VLOOKUP(A3,INDIRECT("'"&LOOKUP(A1,{1,2,3,4,5,6,7, 8,9,10,11,12},
{"January","February","March","April","May","June" ,
"July","August","September","October","November"," December"})&
"'!A:B),2,FALSE)



"Luke M" wrote in message
.. .
Take a look at using the INDIRECT function, perhaps something like:

=VLOOKUP(A3,INDIRECT("'"&A1&"'!A:B),2,FALSE)

--
Best Regards,

Luke M
"HotaG" wrote in message
...
Can a lookup be embedded in another lookup? A file has separate sheets
for
each month with identical formats. A file has 13 sheets, one for each
month
and a YTD sheet. Each sheet has P&L data for multiple companies and the
YTD
sheet has a data entry field to identify the current month. Based on
the
value in that field, the lookup function should, first, go to the
correct
month's sheet, then lookup the correct value. Ex: YTD Cell A1=4 for
April;
All sheets Cell A3=Sales; Col B = ABC, Inc. The lookup formula will
lookup
A1, go to the April sheet, then perform the lookup function.





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
Embedded if? Timbo[_2_] Excel Worksheet Functions 2 January 22nd 09 12:30 AM
Embedded Objects JLMHoss Excel Discussion (Misc queries) 0 June 18th 08 03:56 PM
Embedded Video Mr. Matt Excel Worksheet Functions 0 March 14th 08 06:23 PM
embedded ifs Daniel Q. Excel Worksheet Functions 3 July 25th 06 05:26 PM
Need help with an embedded IF statement Lari Excel Worksheet Functions 8 June 17th 06 04:59 PM


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