Tuesday, August 21, 2012

Spreadsheet query for getting number of rows by comparing dates

Spreadsheet query for getting number of rows from data by comparing dates


Here is the table:




The Objective: 
Record the amount of people who are enrolled/wait-listed and attended/cancelled in a specific course within a month. 


Example:
How many people in Sales have enrolled and attended training in March 2012? 

Formula 1:
=ROWS(QUERY(A2:D,"select * where A='Sales' and B='enrolled' and C >= DATE '2012-3-1' and C <= DATE '2012-3-31' and D='attended'"))

Result 1:
This will give you the result: 2 for the above table.



Formula 2:
=QUERY(A2:D,"select * where A='Sales' and B='enrolled' and C >= DATE '2012-3-1' and C <= DATE '2012-3-31' and D='attended'")

Result 2:




I hope the above solution will help you, and if you need more help then please do comment below on this blog itself I will try to help you out.

If this blog post was helpful to you, and if you think you want to help me too and make my this blog survive then please donate here: http://igoogledrive.blogspot.com/2012/09/donate.html 

Thanks,
Kishan,

No comments:

Post a Comment