SUMPRODUCTS with OR

Laserek_Poland

New Member
Joined
Jul 30, 2018
Messages
1
Dear

I have a question to you.
Im using SUMPRODUCT for some querry and its perfectli works if at criteria Im using onlu one paramiter for one comumn.

But now I want to use two parameters for one of columns.

Simple example below


Month Turnover …….
Jan 1
Feb 2
March 3



Dec 10

So how to make SUMPRODUCTS for column A (Month) and know sum of turnover in Jan and Dec ot Jan March and DEC?
Any suggestion?

Greg
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
maybe =SUMPRODUCT((A2:A13="Jan")*B2:B13)+SUMPRODUCT((A2:A13="Dec")*B2:B13)+SUMPRODUCT((A2:A13="Mar")*B2:B13)
or
=SUMPRODUCT(--((A2:A13="Jan")+(A2:A13="Dec")+(A2:A13="Mar")),B2:B13)
 
Last edited:
Upvote 0

Excel 2010
ABCD
2Jan218
3Jan3
4Feb4
5Feb5
6Dec6
7Dec7
7a
Cell Formulas
RangeFormula
D2=SUMPRODUCT(--((A2:A13="Jan")+(A2:A13="Dec")),(B2:B13))



You can use "+" for "Or".
 
Upvote 0
Hi,

You can do either of these, add as many conditions as you need within the curly brackets:


Book1
ABCD
1MonthTurnover
2Jan116
3Feb216
4Mar3
5Apr4
6May5
7Jun6
8Jul7
9Aug8
10Sep9
11Oct10
12Nov11
13Dec12
Sheet162
Cell Formulas
RangeFormula
D2=SUMPRODUCT((A2:A13={"Jan","Mar","Dec"})*B2:B13)
D3=SUM(SUMIF(A2:A13,{"Jan","Mar","Dec"},B2:B13))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,736
Members
448,988
Latest member
BB_Unlv

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