SUMPRODUCT to include negative and positive values

pnr8uk

New Member
Joined
Oct 6, 2018
Messages
19
Morning all

I have a problem with my SUMPRODUCT formula.

I have one column in my spreadsheet which contains P&L expressed as -£1.00 or £1.00 the columns are formatted as currency.

However I want to get the total P&L from these columns based on Month and Year (though that is not important in this question)

When I use this formula.

=SUMPRODUCT((MONTH(MatchBetting!A$5:A$1000)=8)*(YEAR(MatchBetting!A$5:A$1000)=2018)*(MatchBetting!T$5:T$1000))

I always end up with a negative value. I know this is incorrect as a SUBTOTAL on the column reveals the true positive amount. Also a calculator too :-)

Any ideas on how I change/adapt/don't use the above formula to sum a column with positive and negative values? I do need the by month function (so quite important after all)

Many thanks for any help

P
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Welcome to the board. This works for me:
Code:
=SUMPRODUCT(--(MONTH(MatchBetting!$A$5:$A$1000)=8),--(YEAR(MatchBetting!$A$5:$A$1000)=2018),MatchBetting!$T$5:$T$1000)
 
Upvote 0
Welcome to the board. This works for me:
Code:
=SUMPRODUCT(--(MONTH(MatchBetting!$A$5:$A$1000)=8),--(YEAR(MatchBetting!$A$5:$A$1000)=2018),MatchBetting!$T$5:$T$1000)

That works beautifully thank you for this, sorry for the delay in replying. Very helpful indeed.

Cheers
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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