SUMIF Help

ddub25

Well-known Member
Joined
Jan 11, 2007
Messages
625
Office Version
  1. 2019
Platform
  1. Windows
Struggling to create the correct syntax for a SUMIF. I want to ask:

IF Y3="Dan W"
THEN, SUMIF('Profit Breakdown'!A5:A26,THIS MONTH,'Profit Breakdown'!C5:C26)

IF Y3="Paul P"
THEN, SUMIF('Profit Breakdown'!M5:M26,THIS MONTH,'Profit Breakdown'!O5:O26)

IF NOT=0

Can anyone help, thanks

Dan
 
Hi thank you for your feedback.:)
I get zero value for my formula. Try it.
Excel Workbook
ABMNRSTU
1DateAmountDateAmountDateCriteriaPersonAmount
2Sep-10100Sep-1030023/11/2011Dan W0
3Oct-10200Oct-10350
4Nov-10300Nov-10400
5Dec-10400Dec-10450
6Jan-11500Jan-11500
7Feb-11600Feb-11550
8Mar-11700Mar-11600
9Apr-11800Apr-11650
10May-11900May-11700
Sheet3
Excel 2010
Cell Formulas
RangeFormula
U2=IF(T2="Dan W",SUMIF(A2:A10,S2,B2:B10),IF(T2="Paul P",SUMIF(M2:M10,S2,N2:N10),0))
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
yes, it does give 0 if I enter 23/11/11 in Y1, but it also seems to give 0 for other date entries where it should return a value. I think that your formula looks for an exact match of the date and if not found it returns 0.

All my months in range A5:A26 are for the 10th of each month so unless i enter the 10th of a particular month in Y1 I get a return of 0. Thats why I was asking if I can use a date format that just specifies Month/Date. I am using "mmm-yy" but it does not let me just enter, say 08/11 to get Aug-11. If I enter 08/11 in Y1 or the range A5:A26 I get Nov-11 displayed in the cell, but 08/11/2011 in the formula bar.

Can I simplify the date format?

Dan
 
Upvote 0
How about this.
Excel Workbook
ABMNRSTU
1DateAmountDateAmountDateCriteriaPersonAmount
2Sep-10100Sep-1030002/02/2011Paul P550
3Oct-10200Oct-10350
4Nov-10300Nov-10400
5Dec-10400Dec-10450
6Jan-11500Jan-11500
7Feb-11600Feb-11550
8Mar-11700Mar-11600
9Apr-11800Apr-11650
10May-11900May-11700
Sheet3
Excel 2010
Cell Formulas
RangeFormula
U2=IF(T2="Dan W",SUMPRODUCT((MONTH(A2:A10)=MONTH(S2))*(YEAR(A2:A10)=YEAR(S2))*(B2:B10)),IF(T2="Paul P",SUMPRODUCT((MONTH(M2:M10)=MONTH(S2))*(YEAR(M2:M10)=YEAR(S2))*(N2:N10)),0))
 
Upvote 0
Thanks very much for your help Villareal and Scotty, the last solution works great. Thanks very much for your time. Here's the final adaptation:

=IF(R3="Dan W",SUMPRODUCT((MONTH('Profit Breakdown'!A5:A26)=MONTH(Y1))*(YEAR('Profit Breakdown'!A5:A26)=YEAR(Y1))*('Profit Breakdown'!B5:B26)),IF(R3="Paul P",SUMPRODUCT((MONTH('Profit Breakdown'!M5:M26)=MONTH(Y1))*(YEAR('Profit Breakdown'!M5:M26)=YEAR(Y1))*('Profit Breakdown'!N5:N26)),0))

Dan
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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