The following formula is used to count the number of dates in a column of which the date is later than the date stored in cell D1.
I'm just looking for pointers on how it works.
=SUMPRODUCT((C4:C25>D1)*(C4:C25<>"N/A"))
Many Thanks
The following formula is used to count the number of dates in a column of which the date is later than the date stored in cell D1.
I'm just looking for pointers on how it works.
=SUMPRODUCT((C4:C25>D1)*(C4:C25<>"N/A"))
Many Thanks
Last edited by Brightspark; 06-08-2012 at 03:49 PM.
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Hi,
In my opinion a straightforward =COUNTIF(C4:C25,"<>N/A") would have been preferable.
SUMPRODUCT was more extensively used prior to XL 2007 which ushered in SUMIFS() and COUNTIFS() which largely did away with the need for the SumProduct array formula.
It works by evaluating each row from C4:C5 in the two internal sets of parentheses. So for instance if C4 > D1 then a value of 1 is returned, and if not zero. Similarly if C4 <> "N/A" then that too will result in a 1. Therefore the effect of multiplying 1 x 1 for C4 gives the value 1. If say on C5 the two results are 1 & 0 then C5 will evaluate to 0. You can probably see therefore that the sum of all these individual row C results will give you the count of how many rows in C4:C25 meet both criteria.
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
[QUOTE=Richard Buttrey;2817372]Hi,
In my opinion a straightforward =COUNTIF(C4:C25,"<>N/A") would have been preferable.
Thanks Richard,
But this formula doesn't compare the dates in column c to the date entered in D1.
Any Ideas?
Sorry,
I mentioned COUNTIFS() plural and then didn't use it. Instead
=COUNTIFS(C4:C25,"<>N/A",C4:C25,">"&D1)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks