Hi, I'm looking to be able to total the number of dates present in a column. Some of the cells will be empty and other will have a date in them. Do I use COUNTIF or SUMPRODUCT?
Thanks in advance
Sean
Hi, I'm looking to be able to total the number of dates present in a column. Some of the cells will be empty and other will have a date in them. Do I use COUNTIF or SUMPRODUCT?
Thanks in advance
Sean
You can use sumproduct, this example will count cells between two dates, you can adjsut the start date and end date.
=SUMPRODUCT(--(A2:A1000>=DATE(2012,1,1)),--(A2:A1000<=DATE(2012,12,31)))
countif will work, just use =countif(A1:A100,">0")
If you liked my solution, please click on the Star -- to add to my reputation
If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.
If I understand correctly - you want a total of the number of cells that an entry in them - the code below will count any cell that has a value greater than 0.
Please Login or Register to view this content.
hello
@ daves formula we can adjust this to : betwenn 2000 - 2050
=SUMPRODUCT(N(YEAR(A1:A100)>=2000),N(YEAR(A1:A100)<=2050))
NOTE: dates are also numbers if you use countif it will include the numbers on the count..
exam.
5
6
11/12/2011
5
=countif() will return 4
I think people forget the word "THANK YOU!!!!" Do you still know it???
There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "
Regards,
Vladimir
Thank everyone for your quick response. Much appreciated. I used Dgagnons version in the end. Sean
**Misread prev post
Last edited by jstn; 03-05-2012 at 09:00 PM. Reason: *removed
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks