+ Reply to Thread
Results 1 to 6 of 6

Total sum of the cells from multiple rows and 2 sheets

  1. #1
    Registered User
    Join Date
    09-27-2016
    Location
    Finland
    MS-Off Ver
    MS 2016
    Posts
    11

    Exclamation Total sum of the cells from multiple rows and 2 sheets

    Hello.
    I'm working with quite a large material and would appreciate your help a lot.
    The information I need is in two sheets (which is not a real problem) but I've tried a lot of different combinations of functions and still can't get it done correctly. In first column there is an ID-number which is same for each person in both sheets. Each ID may have varying number of transactions (each in its own row). I would like to calculate the total values (not the number of the cells meeting the criteria) of each ID from both worksheets into a single cell. Is there any way getting it done?
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Total sum of the cells from multiple rows and 2 sheets

    You can put this formula in D2 of Sheet1:

    =SUMIF(Taulukko1[[#All],[id]],Taulukko1[[#This Row],[id]],Taulukko1[[#All],[value]]) + SUMIF(Taulukko2[[#All],[id]],Taulukko1[[#This Row],[id]],Taulukko2[[#All],[value]])

    and it should automatically fill down. You may need to change the commas ( , ) to semicolons ( ; ), depending on your regional settings.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    09-27-2016
    Location
    Finland
    MS-Off Ver
    MS 2016
    Posts
    11

    Re: Total sum of the cells from multiple rows and 2 sheets

    Thank you for the help! I was able to get the formula work now though it required me to switch the language to english. :D
    However, for further analysis I would need only one cell for each id-number as it now calculates the value for each row. Therefore there is multiple values if there is more than one transaction for that particular id. Any solutions for this?

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Total sum of the cells from multiple rows and 2 sheets

    Use this formula instead:

    =IF(COUNTIF(A$2:A2,A2)=1,SUMIF(Taulukko1[[#All],[id]],Taulukko1[[#This Row],[id]],Taulukko1[[#All],[value]]) + SUMIF(Taulukko2[[#All],[id]],Taulukko1[[#This Row],[id]],Taulukko2[[#All],[value]]),"")

    (changes in red). It will show the totals only on the first row of any ID.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    09-27-2016
    Location
    Finland
    MS-Off Ver
    MS 2016
    Posts
    11

    Re: Total sum of the cells from multiple rows and 2 sheets

    Thanks, I owe you a lot. You saved me from so much more frustration.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Total sum of the cells from multiple rows and 2 sheets

    You're welcome, and thanks for the rep.

    You know where to come if you have any other problems.

    Pete

+ 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. Replies: 2
    Last Post: 03-30-2016, 01:55 PM
  2. total by age over multiple sheets
    By drifted78 in forum Excel General
    Replies: 6
    Last Post: 03-23-2015, 04:37 PM
  3. Replies: 1
    Last Post: 04-26-2012, 01:23 PM
  4. Match cells from Multiple sheets and copy rows
    By Kilcup01 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-29-2011, 12:43 PM
  5. Making TOTAL from multiple sheets file
    By virtualcircus in forum Excel General
    Replies: 2
    Last Post: 09-05-2008, 07:28 AM
  6. running total from the same field on multiple sheets as i add she
    By obviscator in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-15-2006, 01:40 PM
  7. subtracting from total multiple sheets (inventory) help.
    By nks1510 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-30-2005, 01:05 PM

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