A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

finding Specific day in a named range



 
 
Thread Tools Display Modes
  #1  
Old September 17th, 2003, 02:40 AM
DK
external usenet poster
 
Posts: n/a
Default finding Specific day in a named range

I am OK with some Adv Beg excel techniques. But I am not sure how to get the
next step done.
I do a monthly schedule in grid format in excel, names down the left
(A-column), and Dates across the top(row-2).
I have set up a template to auto fill the date each time I enter the new
date for the month in the cell A1
range "DAY" is C2 to AG2. This starts at C2 with "=A1" then in C3 "=(c2+1)".
This is formated to show text days of the week "ddd". In the lower rows for
each person a letter is used to indicate where they are to work for this
day.
Some letters are for 12 hour shifts and some for 24hrs. This is easy, but I
need to use a letter on one site that has varying hours depending on the
day. For example "T" on a "Fri" equals 8 hours and "T" on "Sat", "Sun", or
"Mon" equals 12 hours. I have been using the COUNTIF function to determine
the number of each shift worked, but I need to distinguish between Fri and
other days. Is there a simple way to evaluate a persons range (row) and if
there is a "T" check to see if it is in a column that is a Friday or
saturday etc? Since this column changes monthly, I need the formula to
evaluate the date in the column that the "T" resides to see how to count it.

If this does not make sense I have the blank sheet and can send it to anyone
interested in helping.
I appreciate any help anyone can give me.
Thanks,
Mike



  #2  
Old September 17th, 2003, 03:28 AM
Dave Smith
external usenet poster
 
Posts: n/a
Default finding Specific day in a named range

This will return the number of T's on Fridays.

=SUMPRODUCT((B3:H3="T")*(WEEKDAY(Day)=6))

So, extending this principle, something like this can be used to figure Fri,
Sat, Sun and Mon but I have the feeling it can be done more simply:

=SUMPRODUCT((B2:H2="T")*((WEEKDAY(Day)=6)*8 +
((WEEKDAY(Day)=7)+(WEEKDAY(Day)=2))*12))

HTH

-Dave


"DK" wrote in message
.. .
I am OK with some Adv Beg excel techniques. But I am not sure how to get

the
next step done.
I do a monthly schedule in grid format in excel, names down the left
(A-column), and Dates across the top(row-2).
I have set up a template to auto fill the date each time I enter the new
date for the month in the cell A1
range "DAY" is C2 to AG2. This starts at C2 with "=A1" then in C3

"=(c2+1)".
This is formated to show text days of the week "ddd". In the lower rows

for
each person a letter is used to indicate where they are to work for this
day.
Some letters are for 12 hour shifts and some for 24hrs. This is easy, but

I
need to use a letter on one site that has varying hours depending on the
day. For example "T" on a "Fri" equals 8 hours and "T" on "Sat", "Sun", or
"Mon" equals 12 hours. I have been using the COUNTIF function to

determine
the number of each shift worked, but I need to distinguish between Fri and
other days. Is there a simple way to evaluate a persons range (row) and if
there is a "T" check to see if it is in a column that is a Friday or
saturday etc? Since this column changes monthly, I need the formula to
evaluate the date in the column that the "T" resides to see how to count

it.

If this does not make sense I have the blank sheet and can send it to

anyone
interested in helping.
I appreciate any help anyone can give me.
Thanks,
Mike





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.