View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
dribler2 dribler2 is offline
external usenet poster
 
Posts: 96
Default count weekday()=1

Thanks to both,
the info is correct, i use now 1st formula provided by T.Valko.

more power and happy holidays
driller




"Ron Coderre" wrote:

I get 294 Sundays with both formulas, which is the correct answer. Check the
cell values you're referencing.

After you resolve that issue, use the formula Biff posted...it's less
complicated.

***********
Regards,
Ron

XL2002, WinXP


"dribler2" wrote:

excuse me Sir Ron,
I got a minor problem between the formula you gave me and Biff's one,

here is the dates
start_date: 01 Jan 2007
End_date: 21 Aug 2012

My boss will surely dump me with all of his hair loosing questions.

you formula gave me a count of 294 sundays
Biff's one gave me a count of 295 sundays
I dont know now which one should i reconcile to consider..i hope i will not
count the colors he need plus the real sunday's count. I may not spend a a
real holiday this new year. Please help.

thank you sir,
romelsb
Thanks a lot



"Ron Coderre" wrote:

Try this:

With
A1: (the start date)
B1: (the end date)

This formula counts the number of Sundays within that range
=INT((B1-A1)/7)+OR(WEEKDAY(A1)=1,WEEKDAY(B1)=1)

Note: 1=Sunday, 2=Monday.....7=Saturday

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"dribler2" wrote:

pls give me a single formula to count the desired number of specific weekday.

something like this

=countif(start_date:end_date,weekday(1))

e.g.
if start_date is 01/Dec/06 and end_date is 31/Dec/06, then find how many
sundays are within this 2 dates. (in this case the count = 5)

I hope someone out there can share their bright formulated gifts this new
year.
.
wish it is easy...
dribler2.