#1   Report Post  
Posted to microsoft.public.excel.newusers,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
external usenet poster
 
Posts: 29
Default COUNT Function

I am working on a work schedule for a group of employees. They are schedule
to work through a range of time. For example, Mr. B works from 8 am to 5
PM, Mrs. C works from 10 am through 5 pm...ect. The layout would be similar
to the one below
A B C D F
Name start end Hour # of workers
Mr B 8 am 5 pm 6 am ?
Mrs C 10 am 5 pm 7 am ?
8 am ?

I want to know the number of workers scheduled for 6 am or from 6 am to 7
am, or each hour according to the range of start and end times to work on
the left side. How to I write a function that would accomplish this on
column F? I know I must use the count function, but I can' t put the logics
into the function. Can anybody help?


  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,574
Default COUNT Function

=SUMPRODUCT(--(A1:A1),--(D1:D10="6 AM")) will do that. For an explanation of
the -- symbol see http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Richard" wrote:

I am working on a work schedule for a group of employees. They are schedule
to work through a range of time. For example, Mr. B works from 8 am to 5
PM, Mrs. C works from 10 am through 5 pm...ect. The layout would be similar
to the one below
A B C D F
Name start end Hour # of workers
Mr B 8 am 5 pm 6 am ?
Mrs C 10 am 5 pm 7 am ?
8 am ?

I want to know the number of workers scheduled for 6 am or from 6 am to 7
am, or each hour according to the range of start and end times to work on
the left side. How to I write a function that would accomplish this on
column F? I know I must use the count function, but I can' t put the logics
into the function. Can anybody help?



  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.newusers
external usenet poster
 
Posts: 6,953
Default COUNT Function

sumproduct(--($B$1:$B$100<TimeValue("6:00
AM")),--($C$1:$C$100TimeValue("7:00 AM")))

would be a start.

--
Regards,
Tom Ogilvy



"Richard" wrote:

I am working on a work schedule for a group of employees. They are schedule
to work through a range of time. For example, Mr. B works from 8 am to 5
PM, Mrs. C works from 10 am through 5 pm...ect. The layout would be similar
to the one below
A B C D F
Name start end Hour # of workers
Mr B 8 am 5 pm 6 am ?
Mrs C 10 am 5 pm 7 am ?
8 am ?

I want to know the number of workers scheduled for 6 am or from 6 am to 7
am, or each hour according to the range of start and end times to work on
the left side. How to I write a function that would accomplish this on
column F? I know I must use the count function, but I can' t put the logics
into the function. Can anybody help?



  #4   Report Post  
Posted to microsoft.public.excel.newusers,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel.worksheetfunctions
external usenet poster
 
Posts: 751
Default COUNT Function

On Mar 12, 7:19 pm, "Richard" wrote:
I am working on a work schedule for a group of employees. They are schedule
to work through a range of time. For example, Mr. B works from 8 am to 5
PM, Mrs. C works from 10 am through 5 pm...ect. The layout would be similar
to the one below
A B C D F
Name start end Hour # of workers
Mr B 8 am 5 pm 6 am ?
Mrs C 10 am 5 pm 7 am ?
8 am ?

I want to know the number of workers scheduled for 6 am or from 6 am to 7
am, or each hour according to the range of start and end times to work on
the left side. How to I write a function that would accomplish this on
column F? I know I must use the count function, but I can' t put the logics
into the function. Can anybody help?


Actually COUNT will not get you far here. If D2 stands for the 6-7am
slot, then in F2:
=SUMPRODUCT(($B$2:$B$10<=D2)*($C$2:$C$10=D2))

All this, provided that your cells in columns B:C contain actual times
and not text that is interpreted as time by the human.

HTH
Kostis Vezerides

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count Function PABHL Excel Discussion (Misc queries) 6 June 8th 06 07:08 PM
Count Function Rikuk Excel Worksheet Functions 3 May 30th 06 04:51 PM
count function help Karen Excel Worksheet Functions 5 April 14th 06 11:00 PM
which count function? y_not Excel Discussion (Misc queries) 6 March 23rd 06 07:24 AM
using the count function barklek Excel Discussion (Misc queries) 3 August 22nd 05 01:00 PM


All times are GMT +1. The time now is 12:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"