View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Marcel Marien Marcel Marien is offline
external usenet poster
 
Posts: 17
Default Count cells that contain a date that is not a Sunday

Dear Dave,

thank you *sooo* much for the links - they were very helpful reading.
I guess I need something like

=SUMPRODUCT(--(CELL("Format";A1:V1)="D1")*(WEEKDAY(A1:V1)1))
However, the 1st part of the formula seems to return the cell format of the
1st cell of the range, not the format of each cell. Do you have any idea
what I am doing wrong?

Marcel


"Dave Peterson" schrieb im Newsbeitrag
...
If the only numbers in that column are dates, you can use:

=SUMPRODUCT(--(WEEKDAY(A1:A999)=1))

Adjust the ranges to match--but you can't use whole columns.

=sumproduct() likes to work with numbers. The -- stuff changes trues and
falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

Marcel Marien wrote:

Hello,

can anybody tell me how to formulate:

"Count all cells in a row which contain a date (not every cell contains a
date) that does not fall on a Sunday"?

Somehow I just don't seem to get it.
Thank you very much in advance,

Marcel


--

Dave Peterson