Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
H H is offline
external usenet poster
 
Posts: 57
Default Count Saturdays in a List

Hi,

I need to count the number of Saturdays in an array of dates. I used the
following approach, which didn't work. Does anyone have another idea?

{=SUM(IF((WEEKDAY(array1,2)=7),1,0))}

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Count Saturdays in a List

{=SUM(IF((WEEKDAY(array1,2)=6),1,0))}

or

{=SUM(IF((WEEKDAY(array1,1)=7),1,0))}

HTH
Kostis Vezerides


H wrote:
Hi,

I need to count the number of Saturdays in an array of dates. I used the
following approach, which didn't work. Does anyone have another idea?

{=SUM(IF((WEEKDAY(array1,2)=7),1,0))}

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Count Saturdays in a List

Try something like this:

With dates in A1:A100

This formula counts the number of Saturdays
=SUMPRODUCT(--(WEEKDAY(A1:A100)=7))

Or....if some of the cells may be blank:
=SUMPRODUCT(--((A1:A1000)*(WEEKDAY(A1:A100)=7)))
Does that help?
***********
Regards,
Ron

XL2002, WinXP


"H" wrote:

Hi,

I need to count the number of Saturdays in an array of dates. I used the
following approach, which didn't work. Does anyone have another idea?

{=SUM(IF((WEEKDAY(array1,2)=7),1,0))}

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 740
Default Count Saturdays in a List

it looks you're aware of entering an array formula
lets see another idea maybe something like this
=SUM(--(WEEKDAY(A1:A20)=7))
hit ctrl-shft-ent..

--
*****
birds of the same feather flock together..



"H" wrote:

Hi,

I need to count the number of Saturdays in an array of dates. I used the
following approach, which didn't work. Does anyone have another idea?

{=SUM(IF((WEEKDAY(array1,2)=7),1,0))}

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Count Saturdays in a List

=SUMPRODUCT(--(WEEKDAY(A1:A20)6))

Biff

"H" wrote in message
...
Hi,

I need to count the number of Saturdays in an array of dates. I used the
following approach, which didn't work. Does anyone have another idea?

{=SUM(IF((WEEKDAY(array1,2)=7),1,0))}

Thanks!





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Count Saturdays in a List

And one mo

=SUM(IF(MOD(R,7),,1))

Array entered. Where R is a range name for your data.

--
Thanks,
Shane Devenshire


"T. Valko" wrote:

=SUMPRODUCT(--(WEEKDAY(A1:A20)6))

Biff

"H" wrote in message
...
Hi,

I need to count the number of Saturdays in an array of dates. I used the
following approach, which didn't work. Does anyone have another idea?

{=SUM(IF((WEEKDAY(array1,2)=7),1,0))}

Thanks!




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 287
Default Count Saturdays in a List

I think that

=SUM(IF(MOD(R,7),,1))

is a little dangerous, Shane. If you're using the 1904 date system it'll
count Fridays.......

"ShaneDevenshire" wrote:

And one mo

=SUM(IF(MOD(R,7),,1))

Array entered. Where R is a range name for your data.

--
Thanks,
Shane Devenshire


"T. Valko" wrote:

=SUMPRODUCT(--(WEEKDAY(A1:A20)6))

Biff

"H" wrote in message
...
Hi,

I need to count the number of Saturdays in an array of dates. I used the
following approach, which didn't work. Does anyone have another idea?

{=SUM(IF((WEEKDAY(array1,2)=7),1,0))}

Thanks!




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Count Saturdays in a List

You can modify it to work with the 1904 date system. I don't suspect that a
lot of people on PC's use that? And maybe not even that many on the Mac.

=SUM(IF(MOD(R,7)=1,1))

--
Cheers,
Shane Devenshire


"daddylonglegs" wrote:

I think that

=SUM(IF(MOD(R,7),,1))

is a little dangerous, Shane. If you're using the 1904 date system it'll
count Fridays.......

"ShaneDevenshire" wrote:

And one mo

=SUM(IF(MOD(R,7),,1))

Array entered. Where R is a range name for your data.

--
Thanks,
Shane Devenshire


"T. Valko" wrote:

=SUMPRODUCT(--(WEEKDAY(A1:A20)6))

Biff

"H" wrote in message
...
Hi,

I need to count the number of Saturdays in an array of dates. I used the
following approach, which didn't work. Does anyone have another idea?

{=SUM(IF((WEEKDAY(array1,2)=7),1,0))}

Thanks!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I count the frequency of items in a non-numeric list? Dave F Excel Worksheet Functions 0 November 28th 06 06:54 PM
How do I get a cell to count values from a list dependent on anoth John Excel Worksheet Functions 1 September 13th 06 04:22 PM
Count consecutive dates only [email protected] Excel Discussion (Misc queries) 0 May 4th 06 03:58 PM
Setting for Excel automatically show count result in list ? Andrew Tan Excel Worksheet Functions 1 March 20th 06 02:37 AM
how can I count distinct names in an excel list? RPC@Frito Excel Discussion (Misc queries) 5 February 3rd 05 09:12 PM


All times are GMT +1. The time now is 12:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"