ShafiqqAziz
New Member
- Joined
- Jan 9, 2018
- Messages
- 6
Hello guys,
I need a help create a sum with 1 condition in multiple columns.
Here's an example:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Quantity 1[/TD]
[TD]Quantity 2[/TD]
[TD]Quantity 3[/TD]
[TD]Quantity 4[/TD]
[/TR]
[TR]
[TD]Item 1[/TD]
[TD]-1[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Item 2[/TD]
[TD]0[/TD]
[TD]-1[/TD]
[TD]1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Item 3[/TD]
[TD]-2[/TD]
[TD]1[/TD]
[TD]-1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Item 4[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]-2[/TD]
[/TR]
</tbody>[/TABLE]
What i'm trying to do here, i want the sum to be separated between negative and positive.
E.g:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Quantity Negative[/TD]
[TD]Quantity Positive[/TD]
[/TR]
[TR]
[TD]Item 1[/TD]
[TD]-1[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Item 2[/TD]
[TD]-1[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Item 3[/TD]
[TD]-3[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Item 4[/TD]
[TD]-2[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
I've tried SUMPRODUCT((A2:A5=A2)*(B2:E5>0)*(B2:E5)) give me #VALUE ! error.
Tried all of this
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?
I need a help create a sum with 1 condition in multiple columns.
Here's an example:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Quantity 1[/TD]
[TD]Quantity 2[/TD]
[TD]Quantity 3[/TD]
[TD]Quantity 4[/TD]
[/TR]
[TR]
[TD]Item 1[/TD]
[TD]-1[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Item 2[/TD]
[TD]0[/TD]
[TD]-1[/TD]
[TD]1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Item 3[/TD]
[TD]-2[/TD]
[TD]1[/TD]
[TD]-1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Item 4[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]-2[/TD]
[/TR]
</tbody>[/TABLE]
What i'm trying to do here, i want the sum to be separated between negative and positive.
E.g:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Quantity Negative[/TD]
[TD]Quantity Positive[/TD]
[/TR]
[TR]
[TD]Item 1[/TD]
[TD]-1[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Item 2[/TD]
[TD]-1[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Item 3[/TD]
[TD]-3[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Item 4[/TD]
[TD]-2[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
I've tried SUMPRODUCT((A2:A5=A2)*(B2:E5>0)*(B2:E5)) give me #VALUE ! error.
Tried all of this
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?