Sum Row with standard condition

ShafiqqAziz

New Member
Joined
Jan 9, 2018
Messages
6
Hi guys,

Need some help with my formula.

Here's an example:

Quantity 1Quantity 2Quantity 3Quantity 4
Item 1-1123
Item 21-1-23
Item 3112-3
Item 4-1-12-3

<tbody>
</tbody>

Here's example's answer :

Quantity NegativeQuantity Positive
Item 1-16
Item 2-34
Item 3-34
Item 4-52

<tbody>
</tbody>

What i want to make is to sum the negative and positive pair with item.
Tried this formula SUMPRODUCT((A2:A5=A2)*(B2:E5>0)*(B2:E5)) it returned #VALUE ! error.
Tried following formulas still no answer
1. https://www.extendoffice.com/docume...ultiple-columns-based-on-single-criteria.html
2. https://support.office.com/en-us/ar...nditions-e610ae0f-4d27-480c-9119-eb644f1e847e
3. https://www.extendoffice.com/documents/excel/4097-excel-sum-based-on-column-and-row-criteria.html

Can you guys help me out? Thank you
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
For positives:
=SUMIF(B2:E2,">="&0)
For negatives:
=SUMIF(B2:E2,"<"&0)
 
Last edited by a moderator:
Upvote 0
I must insert this formula for each rows right? I have 1000+ rows of data, and i cannot do that for each of the rows.
 
Upvote 0
I must insert this formula for each rows right? I have 1000+ rows of data, and i cannot do that for each of the rows.

No. Try to learn some very elementary things about the spreadsheets. One is: entering a formula in a cell and copying that formula to other cells...

Row\Col
A​
B​
C​
D​
E​
F​
G​
1​
Quantity 1Quantity 2Quantity 3Quantity 4Quantity NegativeQuantity Positive
2​
Item 1
-1
1
2
3
-1​
6​
3​
Item 2
1
-1
-2
3
-3​
4​
4​
Item 3
1
1
2
-3
-3​
4​
5​
Item 4
-1
-1
2
-3
-5​
2​

In F2 enter and copy down:

=SUMIF($B2:$E2,"<0",$B2:$E2)

In G2 enter and copy down:

=SUMIF($B2:$E2,">0",$B2:$E2)
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,369
Members
449,080
Latest member
Armadillos

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