View Single Post
  #29   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Counting # of days between 2 dates excluding Fri & Sat)

Using Excel 2007 with regional date settings of U.S. English m/d/yyyy...

A1 = 10/1/2008
A2 = 9/30/2009

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A2)))=5))

Returns 52 which is correct.

--
Biff
Microsoft Excel MVP


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
I get 52 (with Excel 2003).
Have you double-checked what =A1 and =A2 show you in General format.
Should be 39722 and 40086 respectively.
It may also be worth copying the formula from the formula bar and pasting
it in here just in case you've got a hiccup in the formula.
--
David Biddulph

Jarek Kujawa wrote:
2008-10-01 and 2009-09-30
I've tried almost all Date formats provided by MS, also General and
Number
no avail



On 22 Mar, 21:28, "T. Valko" wrote:
What dates do you have in A1 and A2?

--
Biff
Microsoft Excel MVP

"Jarek Kujawa" wrote in message

...



it looks fine to me too
but despite everything is set OK with the dates in my worksheet the
result still comes wrong
thks for yr response

On 22 Mar, 12:56, Bernd P wrote:
Hello Jarek,

The formula looks fine, maye you got an input date wrong - perhaps
got tricked by Excel "auto century guess" 1900 resp. 2000?

But if you want to count single weekdays there is a better non-
volatile formula:http://www.sulprobil.com/html/date_formulas.html

Regards,
Bernd- Ukryj cytowany tekst -

- Pokaż cytowany tekst -