ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Counting data for month and year (https://www.excelbanter.com/excel-discussion-misc-queries/197705-counting-data-month-year.html)

ahkasiv

Counting data for month and year
 
I've looked at the multiple threads and can't seem to figure out how to count
the number of cells that have values within a date range. For example, how
many cells in A2:A76 have a value within July 08? I have found how to do it
for the month but how about the year?

Gary''s Student

Counting data for month and year
 
=COUNTIF(A2:A76,"<"&DATEVALUE("8/1/2008"))-COUNTIF(A2:A76,"<"&DATEVALUE("7/1/2008"))

--
Gary''s Student - gsnu200798

ahkasiv

Counting data for month and year
 
Thanks! I made one slight change--< to in <"&DATEVALUE("7/1/2008").

Any idea how I can autofill this formula without too much maintenance.

Thanks again!


"Gary''s Student" wrote:

=COUNTIF(A2:A76,"<"&DATEVALUE("8/1/2008"))-COUNTIF(A2:A76,"<"&DATEVALUE("7/1/2008"))

--
Gary''s Student - gsnu200798


David Biddulph[_2_]

Counting data for month and year
 
Well, you're entitled to make that change if you like, as it was your
question, but perhaps you could explain the logic of your revised formula?
You may also wish to recheck the test results for your revised version, as
Gary''s Student's formula looks to be the correct answer.
--
David Biddulph

"ahkasiv" wrote in message
...
Thanks! I made one slight change--< to in <"&DATEVALUE("7/1/2008").

Any idea how I can autofill this formula without too much maintenance.

Thanks again!


"Gary''s Student" wrote:

=COUNTIF(A2:A76,"<"&DATEVALUE("8/1/2008"))-COUNTIF(A2:A76,"<"&DATEVALUE("7/1/2008"))

--
Gary''s Student - gsnu200798






All times are GMT +1. The time now is 04:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com