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:
Thanks for the help Gerald H, appreciate your time. Joe4's formula addition worked.
 
Upvote 0

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
You are welcome.

I wondered what you were trying to do with: ($A4,0)
because that by itself without any function doesn't really make any sense.
 
Upvote 0
Thanks Joe4, any idea why it would not be counting all the data in that column? there are currently 96 in that column and it is only counting 92? maybe a date error in one of the rows?
 
Upvote 0
Thanks Joe4, any idea why it would not be counting all the data in that column? there are currently 96 in that column and it is only counting 92? maybe a date error in one of the rows?
Yes, it could be due to the time component in column R.
If there is no time component on a date, 0:00 is assumed.
So if you have any value in column R that are on the last day of the month, and have a time component, they will be after 0:00, so will fall outside of our range.
So we need to change it to say "less than" 0:00 of the NEXT day, like this:
Code:
=SUMIFS('Pricing Log'!D:D,'Pricing Log'!$R:$R,">="&$A4,'Pricing Log'!$R:$R,"[COLOR=#ff0000]<"&EOMONTH($A4,0)+1[/COLOR])
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,210
Members
453,023
Latest member
alabaz

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