+ Reply to Thread
Results 1 to 6 of 6

Adding cells in multiple sheets

  1. #1
    Registered User
    Join Date
    08-23-2014
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    20

    Adding cells in multiple sheets

    Hello everyone :D

    i currently have a workbook that i use to keep track of hours per two week period which is represented by the addition of a new sheet with that data. I have a main sheet that is used to tally hours and monies paid dynamically to give me the totals thus far. i am using Sum('sheet1:sheet2'!a1,'sheet2:sheet3'!a2,...etc) when there are changes to the row that an employee would be listed due to the addition or removal of an individual. i would like that to be more intuitive if it can be... for example... lookup the persons name on the column listed, look for row labeled Hours and add that value from each sheet. Any help on how to write that as a formula in a cell on the main tab would be appreciated.

    **added example book
    Attached Files Attached Files
    Last edited by memoe; 09-03-2015 at 09:58 PM. Reason: adding wb

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Adding cells in multiple sheets

    It would help us a lot if you could post a sample spreadsheet, highlighting the issue at hand and showing the desired output. Remember to remove and sensitive data before attaching the spreadsheet.

    To post attach a spreadsheet, click on Go Advanced, and look for Manage Attachments at the bottom.

  3. #3
    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,944

    Re: Adding cells in multiple sheets

    Agree that a sample WB will greatly help.

    This is teh basis of what you need to do...
    1. Create a list of sheet names
    2. Give that list a range name (I called it Tabs)
    3. Use this formula, adjusted for your rangers...
    =SUMPRODUCT(SUMIF(INDIRECT("'"&BldgTabs&"'!T6:T1000"),C794,INDIRECT("'"&BldgTabs&"'!M6:M1000")))

    If you are familiar with excel formulas, you will see that this is essentially a SUMIF() function, using INDIRECT() to catch all the sheer names
    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

  4. #4
    Registered User
    Join Date
    08-23-2014
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    20

    Re: Adding cells in multiple sheets

    thank you for the quick replies... i have look at that example before FDibbins but do not understand the range... what to change to what exactly

  5. #5
    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,944

    Re: Adding cells in multiple sheets

    1. create a list of all sheet names
    2. create a range name for that list
    - highlight range, right-click into range/Define Name/call it Tabs
    3. Use this as the "Refers To"
    =OFFSET(Main!$J$4,0,0,COUNTA(Main!$J:$J),1)
    Note, this is based on your list of sheet names being in column J, starting in row 4
    Adjust this as needed
    4. I used this formula, for Hours…
    =SUMPRODUCT(SUMIF(INDIRECT("'"&Tabs&"'!B5:B1000"),B5,INDIRECT("'"&Tabs&"'!C5:C1000")))
    Again, adjust the references as needed
    Hope this helps
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-23-2014
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    20

    Re: Adding cells in multiple sheets

    That did the trick and i understand that example... thanks so much for the quick replies/help.... you guys rock!!!

+ 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. Adding rows to multiple sheets when adding new item using DataForm
    By pandora1a2b in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-11-2014, 01:00 PM
  2. Adding 1 to a range of cells on multiple sheets
    By dazbear in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-14-2014, 12:32 PM
  3. [SOLVED] Button for adding a new line across multiple sheets, inputting data to certain cells
    By jamief in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-06-2014, 08:40 PM
  4. Replies: 0
    Last Post: 02-06-2013, 09:10 PM
  5. Replies: 5
    Last Post: 01-20-2009, 11:56 AM
  6. adding cells from multiple sheets
    By macafeller in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-16-2007, 09:53 PM
  7. Adding Cells from Multiple Sheets
    By Kevin G in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2005, 02:05 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