Sumif, where the range is in date format (11/02/2018) etc, and the criteria is "FEB"

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
788
Office Version
  1. 2010
Platform
  1. Windows
Any way to do this without a helper column?

Need to countif and sumif the following across two sheets:


Column C which has dates like "01/02/2019" in sheet "JG"

Against the criteria of C1 which is just "Jan" on sheet "Front"


Also in my criteria I'm trying to find value B4 in "Front" against the range "H:H" in "JG"


Have tried Sumproduct but it didn't work very well, any ideas? Obviously I can't do "month(C:C)" otherwise my woes would be over. Thanks!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
To count:

<b>Sheet: Front</b>
Excel Workbook
ABC
1jan
2
3
4some4
Sheet
<b>Sheet: JG</b>
Excel Workbook
ABCDEFGH
1
2
301/01/2019some
401/01/2019any
501/01/2019some
601/01/2019any
701/01/2019some
801/01/2019any
901/01/2019some
Sheet
 
Upvote 0
This is working great, is there a way to SUMPRODUCT value? I now have a count of quantity, I need a total of the value according to those same criteria.

But in which column do you have the data to sum?
 
Upvote 0
I wish Sumifs was more verbose, or able to handle date ranges and their variances without throwing a wobbly.

Hi, is the year important or does your data span mulitple years? Here is a SUMIFS() option that will sum the current year only.


Excel 2013/2016
BC
1jan
2
3
4some19
Sheet1
Cell Formulas
RangeFormula
C4=SUMIFS(JG!F:F,JG!C:C,">=1"&C1,JG!C:C,"<"&EOMONTH(1&C1,0)+1,JG!H:H,B4)




Excel 2013/2016
CDEFGH
301/01/20195some
401/01/20195any
501/01/20191some
601/01/20195any
701/01/20194some
801/01/20198any
901/01/20199some
JG
 
Upvote 0
Hi, is the year important or does your data span mulitple years? Here is a SUMIFS() option that will sum the current year only.

Excel 2013/2016
BC
1 jan
2
3
4some19

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
C4=SUMIFS(JG!F:F,JG!C:C,">=1"&C1,JG!C:C,"<"&EOMONTH(1&C1,0)+1,JG!H:H,B4)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>




Excel 2013/2016
CDEFGH
301/01/20195some
401/01/20195any
501/01/20191some
601/01/20195any
701/01/20194some
801/01/20198any
901/01/20199some

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
JG

Hi,

Thank you very much for this.

For the time being, it's 2019, but eventually we will start taking bookings for 2020 and these figures will need to be reported on. Does the End Of Month formula only count the current year then?
 
Upvote 0
When you have data for Jan 2019 and Jan 2020 do you want a single formula that sums the January totals for both years?

If you do then SUMPRODUCT() is probably the way to go. If you want separate formulas to sum each specific year then that could be done with SUMIFS() but you would need to specify the year you want to sum.
 
Upvote 0
When you have data for Jan 2019 and Jan 2020 do you want a single formula that sums the January totals for both years?

If you do then SUMPRODUCT() is probably the way to go. If you want separate formulas to sum each specific year then that could be done with SUMIFS() but you would need to specify the year you want to sum.



Guys, I appreciate all the help, but I'm scrapping this. The easiest solution is often the best, I've input the dates at the top of the columns as 01/01/2019 and onwards, then formatted them as "mmm" to show "Jan", "Feb", etc. Then just done a countif and sumif to say where the value is greater than or equal to Jan but less than Feb, show me the results.

The trouble with Sumproduct looking across two sheets is the crazy calculation time. I wrote a macro to enter it on a cell-by-cell basis then paste over with values but this still took an age.

So I've gone with the KISS method.

Thanks again for trying to make my dumb method work!
 
Upvote 0

Forum statistics

Threads
1,214,829
Messages
6,121,827
Members
449,051
Latest member
excelquestion515

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