+ Reply to Thread
Results 1 to 4 of 4

Reference data from another workbook based on the worksheet name

  1. #1
    Registered User
    Join Date
    07-29-2016
    Location
    Manila, Philippines
    MS-Off Ver
    2010
    Posts
    79

    Reference data from another workbook based on the worksheet name

    There are 2 files attached, hoping you can look into it and provide insights:

    Book.xlsx: Will be the main worksheet that will display data from the cells of another workbook. Book.xlsx will have multiple sheets which will be named from the months of the year affixed with Week 1 to 5, starting with May Week 1, May Week 2, May Week 3 etc. The sample file contains May Week 1 to December Week 5.

    Score Data: Acts like a dump from which Book! will pull the values from. It contains data from May Week 1 to December Week 5 horizontaly, each column starting from Column F will be for 1 worksheet each.

    Is it possible for example, for Book!"May Week 1" E18 to reference the value from Score Data!"Operations" F2 by comparing the sheet name of Book! to the identical named column on the other workbook?

    The idea is for each worksheet to pull data from the corresponding columns of the other workbook.

    Thank you so much!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Reference data from another workbook based on the worksheet name

    You could do this with INDIRECT, but both workbooks will need to be opened.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    07-29-2016
    Location
    Manila, Philippines
    MS-Off Ver
    2010
    Posts
    79

    Re: Reference data from another workbook based on the worksheet name

    Hello FDibbins, thank you! I have no problems with the workbook being opened since after referencing, I'll have it copy pasted values. The Data Scoring is a one time thing only just to transfer the data to the main book. I know how indirect functions on a basic level, how can it be combined to lookup the value based on the sheet name?


    Update: I think i made it work by using hlookup! wow, I can't believe it worked, aha moment.
    Last edited by mutzie; 02-26-2019 at 06:40 PM.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Reference data from another workbook based on the worksheet name

    Awesome!! Always a good feeling when you work it out yourself

    care to share what you did?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Getting data from a closed workbook based on a cell reference with dynamic data.
    By 2015imsjfw in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 03-24-2017, 10:40 AM
  2. [SOLVED] Reference based on if data appears on anther worksheet
    By MarcLewis in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-23-2014, 04:00 AM
  3. [SOLVED] I would like to change part of a workbook/worksheet reference with data from another cell.
    By hintonm1811 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-11-2014, 11:55 AM
  4. [SOLVED] how to format a cell based on the data reference in another worksheet
    By divi123 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-13-2014, 04:47 AM
  5. Copy data from a copied worksheet to another worksheet based on cell reference
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2013, 02:18 PM
  6. [SOLVED] Macro to open workbook and go to specific worksheet based on cell reference
    By ajmartin17 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2013, 10:44 AM
  7. Display data reference from another worksheet based on cell reference
    By Drew123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2011, 03:52 PM

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