Excel/countif of dates
I am using Excel 2010.
I have a two column table of orders.
In column A - the date
In column B - the number of orders that were order in that date.
26/1/2015 - 6
27/1/2015 - 3
I wish to count all the order per each month.
ANSWER: You would use COUNTIFS() instead as that would allow you to designate multiple criteria.
=COUNTIFS(A:A, ">=1/1/2015", A:A:, "<1/2/2015")
I would be remiss if I did not point out that a Pivot Table would be the more perfect solution as it is inherently capable of grouping table results by month.
---------- FOLLOW-UP ----------
QUESTION: Thanks for your reply Jerry.
In column A I have many more dates, of many months.
Your formula covers only January 2015.
How can I cover all the year?
Back to the COUNTIFS() suggestion, as per your example I demonstrated ONE formula for one specific month. You would create a different formula for the next month, and so on.
You could put the starting date of a given month in a cell, then use that as a reference for a more self-adjusting formula. So perhaps you put Jan 1, 2015 in M2, then in N2 you could put:
=COUNTIFS(A:A, ">="&M2, A:A, "<="&EOMONTH(M2,0))
Then put sequential starting dates in M3, M4, copy down as far as needed, then just copy the N2 formula down.
I would be remiss if I did not again point you to the Pivot Table which does ALL of this and more with minimal effort right out of the box. If you've never played with Pivot Tables before it worth the small amount of time it takes to get comfortable with all the controls. Do it. You will not be sorry, your Excel life will forever improve and simplify.
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here