ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   counting dates (https://www.excelbanter.com/new-users-excel/196479-re-counting-dates.html)

M Kan

counting dates
 
Use a SUMPRODUCT

=SUMPRODUCT(--(MONTH($C$3:$C$46)=F3))

Where C3:C46 is your range of dates. The month function will give you the
month value as 1-12. F3 is a cell that just says 1. Presumably, you'd have
cells F3-F15 to show values of 1-12. Copy the formula down and it will give
you the count of entries from January-December
--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"elwyn" wrote:

In column A I have a series of dates using the format dd-mmm. Can I use a
formula that counts the number of dates in Jan for instance and then changes
to count the number of dates in Feb and so on throughout the year?

Thanks for any help


J Sedoff[_2_]

counting dates
 
M Kan -
I've seen the SumProduct() function used a lot with the "--" (double minus),
what does that do? When I have used it it seems to ignore any values that
occur within that array, is it just telling Excel to treat it as a condition,
rather than useable values?

Thanks, Jim

"M Kan" wrote:
=SUMPRODUCT(--(MONTH($C$3:$C$46)=F3))


Bob Phillips

counting dates
 
No. The conditional tests return arrays of TRUE/FALSE. The double unary
coerces these into arrays of 1/0. These 1/0 arrays are PRODUCTed and SUMmed
as per a normal SUMPRODUCT formula, =SUMPRODUCT(array1, array2,..).

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"J Sedoff" wrote in message
...
M Kan -
I've seen the SumProduct() function used a lot with the "--" (double
minus),
what does that do? When I have used it it seems to ignore any values that
occur within that array, is it just telling Excel to treat it as a
condition,
rather than useable values?

Thanks, Jim

"M Kan" wrote:
=SUMPRODUCT(--(MONTH($C$3:$C$46)=F3))




J Sedoff[_2_]

counting dates
 
Sounds good to me Bob, thanks! Jim


All times are GMT +1. The time now is 07:20 PM.

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