I have a Google Spreadsheet of line items. One of the columns is a Date field. How can I query (or use a formula) to, for example, get the count of records where the Date field is within February of 2011?
Note: Could use a better title
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.Sign up to join this community
You need to use 2 formulas.
Create a month column and use the following formula to "display" the month and year:
I assumed that the data was in column B, you will need to adjust accordingly. Copy this formula down the entire column
Create another column to hold the results, you will need to put the following formula into the cell next to the January 2011 label:
I assumed that the labels are in column D and the results of the text formula are in column C, you will have to adjust accordingly. Copy this formula into the rest of the cells next to the labels.
countif() is a very useful formula. The key to this was the use of the text command to generate a result just showing month and year.