+ Reply to Thread
Results 1 to 7 of 7

Sum of values over multiple columns

Hybrid View

Dave855 Sum of values over multiple... 10-21-2009, 09:05 AM
zbor Re: Sum of values over... 10-21-2009, 09:13 AM
Ron Coderre Re: Sum of values over... 10-21-2009, 09:27 AM
zbor Re: Sum of values over... 10-21-2009, 09:32 AM
Dave855 Re: Sum of values over... 10-21-2009, 11:58 PM
Ron Coderre Re: Sum of values over... 10-22-2009, 07:03 AM
Dave855 Re: Sum of values over... 10-30-2009, 01:22 AM
  1. #1
    Registered User
    Join Date
    10-21-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Smile Sum of values over multiple columns

    I have spreadsheet that has the following 3 items PurcNo, Cost and CustNo continually repeated about 30 times.

    A B C D E F
    ROW 1 PurcNo Cost CustNo PurcNo Cost CustNo
    ROW 2 $89 1 $12 1
    ROW 3 $89 $12 1

    Attached is a the actual file screenshot.

    I would like to know a formula that will sum the value in the Cost columns where the value in CustNo column is equal in this instance 1, without having to do dsum... +dsum...+ etc for each column individually like a did and having a extremely long formula.

    Please help, i have been searching for days and still without a solution.
    Attached Images Attached Images

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,056

    Re: Sum of values over multiple columns

    Add one row above and write this formula:

    A column - leave blank
    B column: =SUMIF(C$8:C$2200,1,B$:B$2200)
    C Column - leave blank

    NBow select all 3 columna A7:C7 and extend to the right
    Never use Merged Cells in Excel

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Sum of values over multiple columns

    With
    Row_1 containing a series of repeating values: PurcNo, Cost, CustNo

    and
    AA1: (a CustNo.....eg 1)

    This formula sums all Cost values where the CustNo matches AA1

    AB1: =SUMPRODUCT((B1:Z1="CustNo")*(B2:Z1000=AA1)*A2:Y1000)
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,056

    Re: Sum of values over multiple columns

    However, maybe all would be easier with pivot table.

  5. #5
    Registered User
    Join Date
    10-21-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Sum of values over multiple columns

    Hi Guys

    Thanks for those of you the replied so quick, is was surprising.

    I still am stuck, and have included an xls sheet to make the problem more clear.

    Instead of using a heap of sumif functions (potentially 50+) is there a better way to achieve a total result returned into a single sell instead of the function i have used.

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Sum of values over multiple columns

    Using the workbook you posted...
    try this variation of the formula I posted earlier:

    C6: =SUMPRODUCT((C11:R11="Cust.Inv #")*(C12:R1000=C4)*B12:Q1000)
    Does that help?

  7. #7
    Registered User
    Join Date
    10-21-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Sum of values over multiple columns

    Hi Ron

    Thank you for your formula and quick reply.

    It is saving me time, apart from the computer taking a 1minute or 2 to recalculate the sheet.

+ 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