+ Reply to Thread
Results 1 to 5 of 5

SUM of lines where there is a common number in a column

  1. #1
    Registered User
    Join Date
    06-26-2013
    Location
    Edinburgh, UK
    MS-Off Ver
    Excel 2016
    Posts
    43

    SUM of lines where there is a common number in a column

    Hello

    I have a spreadsheet containing a list of invoices. Some invoices have several lines and each line is on a new row of the spreadsheet. Some invoices have only one line.
    Each line has a column with the £net amount of that line and another column with the tax amount.

    I am trying to find total line amount (sum of the net amount of each line for that invoice) and total tax amount for that invoice.

    Please see below to explain better - I am trying to generate the blue columns (I entered the values manually to illustrate what I am trying to achieve)
    I've also attached the sample spreadsheet

    I would really appreciate assistance on this


    Capture.JPG
    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,704

    Re: SUM of lines where there is a common number in a column

    You can use this formula in cell K2:

    =IF($J2="","",SUMIF($B:$B,$J2,H:H))

    Copy into L2, then copy those two formulae down, as required.

    Hope this helps.

    Pete

  3. #3
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: SUM of lines where there is a common number in a column

    Or here is another formula

    For TxtTaxableAmt (Total for invoice): =IF(J2="","",SUMPRODUCT(--($B$2:$B$34=B2),$H$2:$H$34))
    For TxtTaxAmt (Total for invoice): =IF(J2="","",SUMPRODUCT(--($B$2:$B$34=B2),$I$2:$I$34))
    If your original question was resolved, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.
    Click on the Add Reputation button (located at the lower-left corner of all post) for those who assisted you in solving your issue.

  4. #4
    Registered User
    Join Date
    06-26-2013
    Location
    Edinburgh, UK
    MS-Off Ver
    Excel 2016
    Posts
    43

    Re: SUM of lines where there is a common number in a column

    Thank you for your help - this worked fine for me.

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

    Re: SUM of lines where there is a common number in a column

    Glad to hear it - thanks for the rep.

    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. [SOLVED] changing non common number format in a column
    By 20GT in forum Excel General
    Replies: 15
    Last Post: 05-03-2017, 01:16 AM
  2. Replies: 6
    Last Post: 02-16-2016, 06:24 AM
  3. [SOLVED] Concatenate variable number of lines within a column
    By ferndiazabarca in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-03-2015, 02:29 AM
  4. Replies: 5
    Last Post: 04-17-2012, 12:28 PM
  5. Counting number of lines in a column that contain data
    By defigart in forum Excel General
    Replies: 2
    Last Post: 11-07-2007, 05:14 PM
  6. multiply a column of number by one common
    By drummer1961 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-02-2007, 01:12 PM
  7. Combine 2 spreadsheets w/1 common column of data, text and number
    By Ginger in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-26-2006, 06:50 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