Re: Calculating number of Saturday's in a Year

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Using DAYS(360) will potentially undercount your Saturdays (as well as
being less efficient by a function call). Better:

=SUMPRODUCT(--(WEEKDAY(A1+ROW(INDIRECT("1:"&(A2-A1))))=7))

Whether to subtract one or not depends on the OP's interpretation of
"between" (i.e., exclusive or inclusive). For instance, if the period
ends on a Saturday, using

=SUMPRODUCT(--(WEEKDAY(A1+ROW(INDIRECT("1:"&(A2-A1)-1)))=7))

will ignore the last day, where the first formula will include it.


In article <06F26D31-D066-4413-B2C8-964248E0EE27@xxxxxxxxxxxxx>,
"David Billigmeier" <dtbill21@xxxxxxxxxxx> wrote:

> Assume your first date is in A1 (4/1/2005) and your second date is in A2
> (3/31/2006), use the following formula (Note, this is an array formula so
> confirm it with CTRL+SHIFT+ENTER).
>
> =SUM(--(WEEKDAY(A1+ROW(INDIRECT("1:"&DAYS360(A1,A2)))-1)=7))
>
> Change the reference of A1 and A2 to fit your data.
.



Relevant Pages

  • How can I subtract a function from a dataset on the fly?
    ... I'm doing some quick plotting and fitting of datasets in gnuplot, ... need to be able to subtract a continuum from my data points. ... to fit a function to my data using the 'fit' ...
    (comp.graphics.apps.gnuplot)
  • Re: How can I subtract a function from a dataset on the fly?
    ... plotting the subtracted continuum (gnuplot takes as default the range ... of the original dataset when plotting). ... One more thing I'd like to do with this - is it possible to apply a fit ... I now have my fit w/parameters a,b,c - I'd like to subtract fat ...
    (comp.graphics.apps.gnuplot)
  • Re: Inverse evaluation - Give x value and get back the y value
    ... You can't subtract a scalar from a fit object -- subtraction isn't defined ... plot(cdate, pop, 'k-', desiredDate, c2(desiredDate), 'r+') ...
    (comp.soft-sys.matlab)
  • A little help with time calculations
    ... subtract to this. ... my only problem is that once the user inputs the time ... and the correction its adding it like it was 100 not to 60 any help? ... Prev by Date: ...
    (comp.lang.python)
  • Re: stitch-counting gadget
    ... You would have to be a serious gadget-geek to use one of ... And I'll bet it doesn't know how to subtract when the you're ... Prev by Date: ...
    (rec.crafts.textiles.yarn)