• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Creating a Dynamic Formula

Jim Watson

New Member
I'm trying to create a formula that does a VLOOKUP on other worksheets depending on which year is specified in an input sheet.

=VLOOKUP($E$9&"-"&B3&"-"&$E$7&"-"&$E$8&"-"&B2,'2013 Gross-up Factors'!F7:L36,7,0)

I want to be able to dynamically change the worksheet tab name from which I'm doing a VLookup. I'd like to be able to put a cell reference in for the year that shows up in bold in the worksheet name in the formula above. Of course, doing that directly won't work. In that way, I could input a year in my main Input tab, and have my VLookup search in the tab whose name is associated with that input year. I know I've done something like this in the past, but I just can't remember exactly how. Can anyone out there help me, please?
 
Welcome to Chandoo.org forums
Try[untested]:
Code:
=VLOOKUP($E$9&"-"&B3&"-"&$E$7&"-"&$E$8&"-"&B2,INDIRECT("'"&A1&" Gross-up Factors'!F7:L36"),7,0)
where A1 shall hold year value 2013
 
Back
Top