+ Reply to Thread
Results 1 to 10 of 10

Sumproduct problem

  1. #1
    Registered User
    Join Date
    09-11-2008
    Location
    malta
    Posts
    34

    Sumproduct problem

    Hi all,
    i am currently working on cost analysis of large projects.
    I have a worksheet with about 100 headings and i would like to sum up the totals of 'quantity x unit price' for each product.
    I tried the sumproduct function but it did not work and i had to do the '=sum(b4*c4,d4*e4,f4*g4,..........) to get the result in the total column. I attach a small sample of the file. Is there a way that i can use some function to get my total instead of the sum function i am using?
    Thanks to all
    paraxis
    Attached Files Attached Files

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Sumproduct problem

    paraxis,

    because your ranges are not contiguous, i.e. you want to multply every other column with the column next to it, it's kinda hard to figure out a better formula than the one you already have.

    Is the data manually entered in the table you are presenting? Or is this table a summary of data entered elsewhere? If the latter, there may be an easier way of calculating the line totals based on the original data input.

    cheers

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Sumproduct problem

    Here, try this:

    =SUMPRODUCT(B7:K7;C7:L7;MOD(COLUMN($A$1:$J$1);2))

    Pull down and format in €

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Sumproduct problem

    Nice one, zboric!!

    paraxis, if zbor's formula throws an error, try replacing the semicolons with commas to suit your Excel settings, like this

    =SUMPRODUCT(B7:K7,C7:L7,MOD(COLUMN($A$1:$J$1),2))

  5. #5
    Registered User
    Join Date
    09-11-2008
    Location
    malta
    Posts
    34

    Re: Sumproduct problem

    Thanks, tried your formula but is not working
    10x Paraxis

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Sumproduct problem

    How do you mean not working... check my signature

    PROJECT%20COST(1).xls

  7. #7
    Registered User
    Join Date
    09-11-2008
    Location
    malta
    Posts
    34

    Re: Sumproduct problem

    Hi Teylyn,
    thanks for your formula it works but if i put it column L it gives me a circular reference obviously. Do you know what might be wrong in the formula?
    Paraxis

  8. #8
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Sumproduct problem

    circular reference is because both me and zbor put the formula in a cell other than column K. To use in column L try


    =SUMPRODUCT(B7:J7,C7:K7,MOD(COLUMN($A$1:$I$1),2))

    when you apply it to your original sheet, adjust the ranges to be the same number of columns, stopping before the totals column.

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Sumproduct problem

    Ahh, yes add one more column And put formula in M ...

    Or change formula into: =SUMPRODUCT(A7:J7,B7:K7,MOD(COLUMN($B$1:$K$1),2))

  10. #10
    Registered User
    Join Date
    09-11-2008
    Location
    malta
    Posts
    34

    Re: Sumproduct problem

    Teylyn
    Thanks tried & worked fantastic. Thanks to all and have a nice week.
    Paraxis

+ 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