Better solution (instead of using SUM.IF function)

Plastikman

New Member
Joined
Apr 25, 2011
Messages
9
It must a smoother solution to calculate total cost of a component etc. within a year instead of using SUM.IF (function.




calcn.jpg


(got red cross picture for some reason when I added a photo of the table. Link to the source: http://img263.imageshack.us/i/calcn.jpg/

SUM.IF gives of course right answer but the formula is way too long, I think.


My function to calculate:
=SUM.IF($A$5:$A$6000;P4;$B$5:$B$6000)+SUM.IF $A$5:$A$6000;P4;$C$5:$C$6000)+...+SUM.IF($A$5:$A$6000;P4;$M$5:$M$6000)


Note, I have a swedish version of Excel 2007, there might be some poor translation here.


Is it possbile to use PRODUCTSUM?

Thanks!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
It must a smoother solution to calculate total cost of a component etc. within a year instead of using SUM.IF (function.




calcn.jpg


(got red cross picture for some reason when I added a photo of the table. Link to the source: http://img263.imageshack.us/i/calcn.jpg/

SUM.IF gives of course right answer but the formula is way too long, I think.


My function to calculate:
=SUM.IF($A$5:$A$6000;P4;$B$5:$B$6000)+SUM.IF $A$5:$A$6000;P4;$C$5:$C$6000)+...+SUM.IF($A$5:$A$6000;P4;$M$5:$M$6000)


Note, I have a swedish version of Excel 2007, there might be some poor translation here.


Is it possbile to use PRODUCTSUM?

Thanks!
Try this...

=SUMPRODUCT((A5:A6000=P4)*B5:M6000)
 
Upvote 0
It must a smoother solution to calculate total cost of a component etc. within a year instead of using SUM.IF (function.




calcn.jpg


(got red cross picture for some reason when I added a photo of the table. Link to the source: http://img263.imageshack.us/i/calcn.jpg/

SUM.IF gives of course right answer but the formula is way too long, I think.


My function to calculate:
=SUM.IF($A$5:$A$6000;P4;$B$5:$B$6000)+SUM.IF $A$5:$A$6000;P4;$C$5:$C$6000)+...+SUM.IF($A$5:$A$6000;P4;$M$5:$M$6000)


Note, I have a swedish version of Excel 2007, there might be some poor translation here.


Is it possbile to use PRODUCTSUM?

Thanks!

If the range to sum runs from column A to column M...

Control+shift+enter, not just enter:

=SUMMA(OM($A$5:$A$6000=P4;$B$5:$M$6000))
 
Upvote 0
Many thanks for your quick answers, T.Valko & Aladin Akyurek!
By far much better ways to enter the calc :)
 
Last edited:
Upvote 0
Many thanks for your quick answers, T.Valko & Aladin Akyurek!
By far much better ways to enter the calc :)

You are welcome. Thanks for providing feedback.

Just a side note though... Whenever one needs to mix vectors and matrices,
the best thing to do is to avoid PRODUKTSUMMA.
 
Upvote 0
You are welcome. Thanks for providing feedback.

Just a side note though... Whenever one needs to mix vectors and matrices,
the best thing to do is to avoid PRODUKTSUMMA.

Thanks for the advice!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
How come you know the Swedish formulas? Did you Google or it possible to get this info via Excel using some VBA code etc?
 
Upvote 0
Thanks for the advice!


You are welcome.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
How come you know the Swedish formulas? Did you Google or it possible to get this info via Excel using some VBA code etc?

I'm using a system Daniel Maher created, which translates a formula from one language into another.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top