Solved

Referencing a sheet via cell

Posted on 2013-06-25
4
233 Views
Last Modified: 2013-06-25
I want to  set up a vlookup within a workbook and I want to be able to pick my worksheet based on a date in cell A2.  The range will always be the same but the worksheet I am referencing will be dynamic based on the date in A2.  this is the formula +IFERROR(VLOOKUP(E$3,'16-Jun-2013'!$B$31:$O$78,MATCH($B11,'16-Jun-2013'!$B$3:$O$3,0),0),0)
0
Comment
Question by:Jenedge73
  • 2
4 Comments
 
LVL 12

Expert Comment

by:telyni19
ID: 39276078
I suggest using the Indirect formula with a Text format of the date in cell A2. Try this:
=IFERROR(VLOOKUP(E$3,INDIRECT(TEXT(A2,"dd-mmm-yyyy")&"!$B$31:$O$78",MATCH($B11,INDIRECT(TEXT(A2,"dd-mmm-yyyy")&"!$B$3:$O$3",0),0),0)
0
 

Author Comment

by:Jenedge73
ID: 39276163
All my worksheets are named DD-MMM-YYYY and in cell A2 I have a date.  I had to add parentheses to the formula however I keep getting a Ref error any ideas?=VLOOKUP(E$3,INDIRECT(TEXT(A2,"dd-mmm-yyyy")&"!$B$31:$O$78"),MATCH($B4,INDIRECT(TEXT(A2,"dd-mmm-yyyy")&"!$B$3:$O$3"),0),0)
0
 
LVL 12

Accepted Solution

by:
telyni19 earned 500 total points
ID: 39276175
Try adding single quotes around the sheet names, then:
=VLOOKUP(E$3,INDIRECT("'"&TEXT(A2,"dd-mmm-yyyy")&"'!$B$31:$O$78"),MATCH($B4,INDIRECT("'"&TEXT(A2,"dd-mmm-yyyy")&"'!$B$3:$O$3"),0),0)
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 39276183
=VLOOKUP(E$3,INDIRECT(TEXT(A2,"dd-mmm-yyyy")&"!$B$31:$O$78"),MATCH($B4,INDIRECT(TEXT(A2,"dd-mmm-yyyy")&"!$B$3:$O$3"),0),0

Should $B4 be $B11 (as per your original question)?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question