+ Reply to Thread
Results 1 to 4 of 4

Selecting a worksheet based on cell value

  1. #1
    Registered User
    Join Date
    03-05-2009
    Location
    Washington
    MS-Off Ver
    Excel 2003
    Posts
    3

    Selecting a worksheet based on cell value

    I am trying to automatically select data from a different sheet to fill data in a cell based on two other cells. I've attached a simplified version of what I'm trying to do (with detailed explanations). I hope it has enough info to get my point across.

    I posted this in the "programming" forum because I'm pretty sure I will need to use vba in some form or fashion to get this to work. I am more familiar with access than excel, so I may be missing some easier way to make excel do this.

    Thanks,
    Attached Files Attached Files
    Last edited by croix; 03-05-2009 at 05:11 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Selecting a worksheet based on cell value

    This is a bit of stretch to get there, but it works. Had to adjust the SheetNames to match the format of the Date cells, too.

    =INDEX(INDIRECT("'"&TEXT(C5,"MMMM YYYY")&"'!B2:B10"),MATCH($A$3,INDIRECT("'"&TEXT(C5,"MMMM YYYY")&"'!a2:a10"),0))
    ...copied across.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-05-2009
    Location
    Washington
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Selecting a worksheet based on cell value

    JB - thanks! This should work just fine.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Selecting a worksheet based on cell value

    Great!

    If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1