If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Look up a value by a concatenated referrence?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-15-10, 10:17
scrtchmstj scrtchmstj is offline
Registered User
 
Join Date: Jan 2009
Location: Louisiana, United States
Posts: 138
Look up a value by a concatenated referrence?

I have a spreadsheet with one summary worksheet and multiple worksheets, one for each month of history. I would essentially like to lookup a value in one of the monthly worksheets depending upon a month and year cell that can be populated in the summary sheet.

To simplify, imagine I have each monthly worksheet tab numbered according to the month (1 for January, 2 for Feb, ...etc). On my summary sheet, there is a cell in which I can enter the month number I want, say I enter 1. I would like to lookup a cell B5 from the month I specified (1 or January). I've tried concatenating a dynamic referrence so that it looks up the value on the sheet number I specified in the control cell but it seems like this only yields a text version of the variable. Is there another lookup type function to do this?.

Thanks,

Joshua
Reply With Quote
  #2 (permalink)  
Old 09-15-10, 15:57
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 495
Hi Joshua,

Let's say in Summary!B2 you have a number from 1 to 12.
Let's also say that you have worksheets in the same workbook called January, February etc...

To get the value from cell A1 on the relevant month worksheet, you could use a formula such as this:
Code:
=INDIRECT("'"&TEXT(DATE(2010,B2,1),"mmmm")&"'!A1")
Note that INDIRECT() is volatile.

Hope that helps...
__________________
Colin

RAD Excel Blog

Other tutorials:
Array Formulas | Deleting Rows with VBA

Last edited by Colin Legg; 09-17-10 at 11:23.
Reply With Quote
  #3 (permalink)  
Old 09-17-10, 10:34
scrtchmstj scrtchmstj is offline
Registered User
 
Join Date: Jan 2009
Location: Louisiana, United States
Posts: 138
Colin,

Cool, thanks. That seems simple enough.

Joshua
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On