View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bhupinder Rayat Bhupinder Rayat is offline
external usenet poster
 
Posts: 64
Default No. of Saturdays between 2 dates

Hi Ryan,

Thanks for this.

Is there anyway I can work out A1 and A29 dynamically based on 2 dates.

E.G

A1 - 1 Jan 08
A2 - 2 Jan 08
A3 - 3 Jan 08
A4 - 4 Jan 08
A5 - 5 Jan 08
A6 - 6 Jan 08
and so on.... to A29.

if in B1 i have 1 Jan 08 and in B2 i have 5 Jan 08, can I reference B1 & B2
to return A1 and A5 in the indirect function?

"ryguy7272" wrote:

Change the range to suit your needs:
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A29)),1)={1}))

Regards,
Ryan--

--
RyGuy


"Bhupinder Rayat" wrote:

Hi All,

I want to count the number of Saturdays between 2 specifed dates.

i.e. between 1 Jan 08 and 31 Jan 08 there are 4 Saturdays.

Can anyone help please?

Thanks,

B/