View Single Post
  #30   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jarek Kujawa[_2_] Jarek Kujawa[_2_] is offline
external usenet poster
 
Posts: 896
Default Counting # of days between 2 dates excluding Fri & Sat)

thanks T.
I checked it on Excel 2007 and 2003, on 2 different PCs
to na avail
I think there might be some bug in WEEKDAY (or I don't know where)
function as both my versions of Excel are Polish (mistake in
translation or sth.)


On 23 Mar, 16:50, "T. Valko" wrote:
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 m...



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 -- Ukryj cytowany tekst -


- Pokaż cytowany tekst -