Sumproduct and if statement

neilsinc

Board Regular
Joined
Jan 20, 2014
Messages
135
Is it possible to use sumproduct and if statements together, or is there an easier way of achieving what I need to do here?

I have the following formula:

=SUMPRODUCT(--(Statement!$J$1:$J$1724=C13),Statement!$L$1:$L$1724)

What this does is look at my bank statement sheet for a particular line (C13), for example "Subscription Fees", and returns the total amount in column L for all with the note of subscription fees.

What I want to do is narrow it down even further. There is another column that indicates either income or expenditure. What I need is to basically say:

Where column J is "Subscription Fees" AND "Income", then return the amount in column L.

What would be the best way to do this? Perhaps the sumproduct function isn't the best any longer.

Thanks in advance for any help
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Where column J is "Subscription Fees" AND "Income"

How can something be 2 things at once?
Do you mean OR ?
Do you mean

Where column J is "Subscription Fees" OR "Income"

"There is another column that indicates either income or expenditure"

An as yet unspecified column.
What column would that be then?
 
Last edited:
Upvote 0
if you mean OR then

=SUMPRODUCT(((Statement!$J$1:$J$1724="Subscription Fees")+(Statement!$J$1:$J$1724="Income")) *(Statement!$L$1:$L$1724))
 
Upvote 0
You haven't said what column has "Income", but try something like
=SUMPRODUCT((Statement!$J$1:$J$1724=C13)*(Statement!$K$1:$K$1724="Income"),Statement!$L$1:$L$1724)
Change values in red to the Income column
 
Last edited:
Upvote 0
You haven't said what column has "Income", but try something like
=SUMPRODUCT((Statement!$J$1:$J$1724=C13)*(Statement!$K$1:$K$1724="Income"),Statement!$L$1:$L$1724)
Change values in red to the Income column


Apologies guys, should've said that Income/Expenditure is in column M. The above looks like it has worked though, when I've adjusted to the correct columns. Thanks very much
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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