+ Reply to Thread
Results 1 to 9 of 9

Adding totals for 2 line with Sumif

  1. #1
    Registered User
    Join Date
    02-26-2013
    Location
    Ogden
    MS-Off Ver
    Excel 2007
    Posts
    53

    Adding totals for 2 line with Sumif

    Right now I have a column and the formula looks like this.

    =SUMIF('Running Totals'!N:N,'Inventory Sheet'!B3,'Running Totals'!E:E)

    It works great and gives me the totals from E:E with the correct corresponding inventory names. How do I get this formula to add some other number from another column. Such as....

    =SUMIF('Running Totals'!N:N,'Inventory Sheet'!B3,'Running Totals'!E:E) + ('Running Totals'!N:N,'Inventory Sheet'!B3,'Running Totals'!F:F)??

    Essentially I am wanting to add E:E lines and F:F lines together to get one sum with the corresponding inventory ID.
    Last edited by Aussie1; 03-03-2013 at 11:53 PM.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Adding totals for 2 line with Sumif

    hi Aussie1, maybe this
    =SUMPRODUCT(('Running Totals'!N1:N1000='Inventory Sheet'!B3)*('Running Totals'!E1:E1000+'Running Totals'!F1:F1000))

    adjust range accordingly.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    02-26-2013
    Location
    Ogden
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Adding totals for 2 line with Sumif

    Tried it. Not working.

  4. #4
    Registered User
    Join Date
    02-26-2013
    Location
    Ogden
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Adding totals for 2 line with Sumif

    Attached the spreadsheet so if you want to look at what I am doing you can see.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Adding totals for 2 line with Sumif

    Quote Originally Posted by Aussie1 View Post
    Tried it. Not working.
    Can you elaborate a little on what exactly isn't working? Are you getting an error message, or an incorrect sum, or......?
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  6. #6
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Adding totals for 2 line with Sumif

    Incidentally, you weren't too far off with your original formula, apart from A) the lack of a 2nd SUMIF, and B) your "+" was surrounded by spaces.

    Please Login or Register  to view this content.
    in E3 on your Inventory tab seems to work - it's returning 11.

    Hope this helps.

  7. #7
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Adding totals for 2 line with Sumif

    like Brendan mentioned, do state how it doesn't work for you. "Tried it. Not working." doesn't help us a lot. i'm assuming you need to find the text from B3 in "Inventory Received" & then go to column N in "Running Totals" to see if there's a text "F308P". if it does, sum up column E & F. if so, change my formula slightly so that it excludes the header & starts from row 2:
    =SUMPRODUCT(('Running Totals'!N2:N1000='Inventory Sheet'!B3)*('Running Totals'!E2:E1000+'Running Totals'!F2:F1000))

  8. #8
    Registered User
    Join Date
    02-26-2013
    Location
    Ogden
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Adding totals for 2 line with Sumif

    BB1972 Thank you much! That worked well!!

  9. #9
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Adding totals for 2 line with Sumif

    You're welcome. Thanks for the rep.

    You should also consider trying benishiryo's amended formula - it may be more efficient (quicker/require less resources) with large amounts of data.

+ 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