formula to count number of orders by month

steve400243

Active Member
Joined
Sep 15, 2016
Messages
429
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello Forum, I have a spreadsheet with a column of end dates in column "R". I need the formula to count all orders from column "D" by month. Here is what I have that is not working - A4 is "JAN-18". H4 is the desired cell for the total

Code:
=SUMIFS('Pricing Log'!D:D,'Pricing Log'!$R:$R,">="&$A4,'Pricing Log'!$R:$R,"<=($A4,0))
 
Last edited:

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
What date is actually in cell A4?
Every valid date entry has a day component associated with it, even if the cell is formatted to only show the month and year.

What do the dates in column D look like?
 
Upvote 0
You have inconsistent formats in the criteria.

Consider this tweak . . .
=SUMIFS('Pricing Log'!D:D,'Pricing Log'!$R:$R,">="&$A4,'Pricing Log'!$R:$R,"<="&$A4)

But also, it looks like you are testing that the values in column R are BOTH GREATER THAN OR EQUAL TO A4, AND LESS THAN OR EQUAL TO A4, which must generate a TRUE result for every possible value CORRECTION, WHICH CAN NEVER BE TRUE FOR ANY VALUE OTHER THAN AN EXACT MATCH TO A4.
 
Last edited:
Upvote 0
A4 = Jan-18, A5 = FEB- 18, etc

Column D is A number 1,2 etc. referencing the number of quotes for that day. Also Sorry for not mentioning the cell H4 is on another sheet named "DATA"

Column R looks like [TABLE="width: 162"]
<tbody>[TR]
[TD="class: xl64, width: 162"]1/2/2018 8:07[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Then try

=SUMIFS('Pricing Log'!D:D,'Pricing Log'!$R:$R,">="&$A4,'Pricing Log'!$R:$R,"<"&$A5)

Do you understand Joe4's point about the day element of the date ?
 
Last edited:
Upvote 0
A4 = Jan-18, A5 = FEB- 18,
That doesn't answer my question regarding Day....

Can you temporarily change the format of the cells in column A to a date format that includes day (i.e. dd/mm/yy) , and let me know what it shows?
 
Upvote 0
I think you are just missing the "EOMONTH" function name in your original formula, i.e.
Code:
=SUMIFS('Pricing Log'!D:D,'Pricing Log'!$R:$R,">="&$A4,'Pricing Log'!$R:$R,"<="&[COLOR=#ff0000]EOMONTH[/COLOR]($A4,0))
 
Upvote 0
Thank you Joe4, that worked. Didnt even think about it. Appreciate your time.
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,310
Members
452,634
Latest member
cpostell

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