+ Reply to Thread
Results 1 to 5 of 5

Sheet Referencing within one Workbook

  1. #1
    Registered User
    Join Date
    01-14-2016
    Location
    London, Ontario
    MS-Off Ver
    2013
    Posts
    3

    Sheet Referencing within one Workbook

    Hi,
    I am creating a workbook that is keeping track of hours worked on several different construction jobs. For each new job, I plan to have a new Sheet that matches a template. I have the sheets calculating the hours separately, and there are no problems there.
    The issue I'm having is I want a Master Log at the beginning of the file that references the names of each sheet, and the hours that are calculated on said sheet. Where I hit a problem is when referencing the sheets; I don't know what the sheets will be named, and I don't know how many sheets I'll have, so I want to create a template that simply looks up the name of the Sheet, and then references that sheet to find the number of hours logged to that job.
    I am willing to use VBA, or regular formula's.
    Please help!
    - Greg

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,363

    Re: Sheet Referencing within one Workbook

    formulae of this type

    =INDIRECT("'" & X1 &"'!A1") gets A1 value from sheet named in X1


    =SUM(INDIRECT("'"&X1&"'!A1:A10")) sums A1:A10 for data in sheet named in X1

    where X1 = Sheet_Name

  3. #3
    Registered User
    Join Date
    01-14-2016
    Location
    London, Ontario
    MS-Off Ver
    2013
    Posts
    3

    Re: Sheet Referencing within one Workbook

    And will this work if I don't have the name of the sheet? I want to have this where I can put in a formula and change the number in the formula, and it references the next sheet. I don't want to have to format the Master Log each time a new job comes in.

  4. #4
    Registered User
    Join Date
    01-14-2016
    Location
    London, Ontario
    MS-Off Ver
    2013
    Posts
    3

    Re: Sheet Referencing within one Workbook

    Quote Originally Posted by JohnTopley View Post
    formulae of this type

    =INDIRECT("'" & X1 &"'!A1") gets A1 value from sheet named in X1


    =SUM(INDIRECT("'"&X1&"'!A1:A10")) sums A1:A10 for data in sheet named in X1

    where X1 = Sheet_Name
    Not sure if you were tagged in that reply. See below.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,363

    Re: Sheet Referencing within one Workbook

    Do you mean ??

    =INDIRECT("'SheetName" & X1 &"'!A1") gets A1 value from sheet number in X1

    So tabs names are "Sheetname1", "Sheetname2" etc and X1 will contain 1, 2 etc

    If you don't have a sheet name then it's "no go"!

    Sheet names with prefix or suffix is the easiest way. Alternatively you have a range of cells containing the sheet names and do a "lookup" of some kind
    Last edited by JohnTopley; 01-15-2016 at 01:34 AM.

+ 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. [SOLVED] Index Match Function Within One Workbook Referencing Cells in Another workbook error
    By Hackboss007 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-18-2014, 12:06 PM
  2. Cell referencing when copying a sheet to a different workbook
    By dmjohnston in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-15-2013, 03:47 AM
  3. [SOLVED] Problem referencing the first sheet of another workbook with changing names
    By floridahockeyguy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-24-2013, 06:00 PM
  4. [SOLVED] Referencing another sheet within a workbook
    By rwbaldwin0728 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-14-2013, 06:29 AM
  5. Replies: 0
    Last Post: 01-09-2013, 06:58 AM
  6. Replies: 3
    Last Post: 05-09-2012, 12:59 PM
  7. Replies: 4
    Last Post: 09-23-2011, 03:41 PM
  8. Vlookup and workbook sheet referencing in 2007
    By esupply in forum Excel General
    Replies: 4
    Last Post: 10-14-2009, 09:17 AM

Tags for this Thread

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