I have a formula
=SUMPRODUCT(MAX(--($O$3:$O$366=O366)*$M$3:$M$366))
This works great but I do not know what the -- does?
Also is there a way to use Name Ranges instead of cell ranges
Range Name CalYr2014 is O3:O366
I have a formula
=SUMPRODUCT(MAX(--($O$3:$O$366=O366)*$M$3:$M$366))
This works great but I do not know what the -- does?
Also is there a way to use Name Ranges instead of cell ranges
Range Name CalYr2014 is O3:O366
To convert TRUE or FALSE to 1 and 0. Sumproduct can't sum a bunch of TRUE's but it can sum a bunch of 1's.
Excel recognizes that you try to perform a numerical calculation on TRUE or FALSE ( the -- operation) and converts it to 1 and 0.
<----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left
If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.
Try:
Formula:Please Login or Register to view this content.
In this particular case -- is unnecessary because the multiplication using * implicitly converts TRUE to 1 and FALSE to zero anyway, so you only need this version
=SUMPRODUCT(MAX(($O$3:$O$366=O366)*$M$3:$M$366))
Audere est facere
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks