+ Reply to Thread
Results 1 to 3 of 3

Dynamic worksheet reference

  1. #1
    Registered User
    Join Date
    10-10-2006
    Posts
    2

    Dynamic worksheet reference

    Ok, I am not an excel programmer. That being said... I have a dynamic drop-down list with names in it. I have worksheets that match the names within that list. I want to be able to select one of those names from the drop down and pull the data from the corresponding worksheet that is named the same as the entry in the list. I am truly at a stopping point until I figure this out. Please help if you can.

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    You can try to do so in a macro:

    vSheetName = activesheet.listbox1.text
    vRange = "A1"

    vOutputRange = "C1"

    activesheet.range(vOutputRange).value = sheets(vSheetName).range(vRange)

    but you can do the same with a function if you prefer to avoid a macro.

    Regards.
    Antonio

  3. #3
    Registered User
    Join Date
    10-10-2006
    Posts
    2

    Answer found

    Thanks for the reply. That reply went completely over my head and hit the wall. Like I said, I am not an excel programmer. I was trying to make it too hard. This is what solved my probelm in case someone else is looking for the answer.

    B2 gets its value from the current worksheet...
    B15 is a dropdown list of other sheet names...
    F9 is the value I want to go get from the other sheet that is used for calculations on this sheet.

    INDIRECT("'"&(INDIRECT("'"&B15&"'!$B$2",TRUE))&"'!$F$9",TRUE)

+ 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