I want to calculate Sundays between a specific date & today ()

G

Guest

Respected Sir
I want to calculate Sundays between a earlier specific date & today ()
Plz gide me about the Function releted wit above work.

thank you
Zahid Khan
 
G

Guest

Try this:-
=SUM(IF(WEEKDAY(A1-1+ROW(INDIRECT("1:"&TRUNC(B1-A1)+1)))=1,1,0))


Start date in A1, End date in A2.

This is an array formula so enter it with CTRL+Shift+Enter.

Will that do?

Mike
 
T

T. Valko

Good (array entered):
=SUM(IF(WEEKDAY(A1-1+ROW(INDIRECT("1:"&TRUNC(TODAY()-A1)+1)))=1,1,0))

Better (normally entered):
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&TODAY())),2)=n))

Best (normally entered):
=INT((WEEKDAY(A1-n,2)+TODAY()-A1)/7)

Where n = day of week: Monday = 1 ...... Sunday = 7

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top