View Single Post
  #10   Report Post  
Biff
 
Posts: n/a
Default

You're welcome! Thanks for the feedback.

Biff

"girlfriend in school" wrote
in message ...
Brilliant!

I don't understand it, but it works! It looks like you maxed out the
formulae for a cell so I will simply have to teach a clerk to fill down on
the column when entering data.

Thanks for your help.



"Biff" wrote:

Hi!

Let's see if we understand you.....

Columns G, H and I, may or may not contain the letter abbreviations for
the
days of the week.

G3 H3 I3 N3 O3 Q3
M F (blank) 10/9/05 12/15/05 (answer)


So, based on your example above, you want to count the Mondays and
Fridays
between 10/9/2005 and 15/15/2005.

Is that what you want?

Try this.....

Just make sure that the abbreviations you use match what are in this
formua:

=IF(COUNT(N3:O3)<2,"",SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(N3&":"&O3)),2)=MATCH(G3:I3,{ "M","T","W","TH","F","SA","SU",0},0))))

Biff

"girlfriend in school"
wrote
in message ...
This is great, but it doesn't factor the variability of the days tried
to
explain in my initial query. Data in columns G, H, and I will be days
of
week, but will change from row to row (as will the respective dates in
columns N and O). Sometimes there will be no data in H and/or I. I am
hoping to create something where a clerk can put in the days of the
week
and
the spreadsheet formula will count up the days. Note: the number of
days
will then be used in another formula to calculated $$.

Perhaps if I show you what I have so far will help:

G3 H3 I3 N3 O3 Q3
M F (blank) 10/9/05 12/15/05 (answer)

I tried Bernie's formula but that didn't work. I had to change cell
references, and I don't understand the formula (and cannot decipher
Excel
Help's explanation) so that might be why.
I am currently using IF formulae to reference columns G, H and I into
the
weekday_number, but think I have exceeded the quantity of formulae one
can
put in a single cell.

If you have an answer, WHAT A RELIEF!!!

THX.


"Biff" wrote:

Hi!

After seeing Bernie's post I'm wondering if I understand the question!

To count specific weekdays between 2 dates (inclusive):

Where Monday = weekday 1 and Sunday = weekday 7

Start date in A1
End date in B1

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)=weekday_numbe r))

To count more than 1 weekday like Mondays and Tuesdays:

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)),2)={1,2}))

Biff

"girlfriend in school"
wrote
in message ...
I need to count the number of days between a start date and end date
and
the
questions about this I found here don't seem to help (boggle me!) I
need
a
universal formula that will cover variable days which are listed in
a
separate column:
G (rows) = names of days; J (rows) = start date; K (rows) = end
date.
On
top of this, I am sometimes having to count more than one day (up to
three)
within a week (e.g., Mondays AND Fridays) which I'd be willing to
put
in
separate columns (i.e., columns G,H,I) if needed, but if only one
column
has
a day listed, the formula needs to ignore the empty columns.
A knotty problem?