Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
S Davis
 
Posts: n/a
Default Counting dates in a RANGE (yargh!) :)

......A...............................I........... ..............J
1.......STATUS..........HIRE DATE.........TERM DATE
2.......Active..............1/24/1984...........12/12/2003
~~~... .............. ........... . ...... .............
5403..Terminated.....3/14/2005............5/24/2006

So I have this large list of employee data. I want to find out the base
number of employees who were here in 2004. What I want to do is COUNT
all "Active" employees in the list, then I want to COUNT all those who
were hired AFTER (2004,12,31), and finally COUNT all those who left
[or. "term dated"] DURING 2004. Once I have those three numbers, I
simply take all Active employees, subtract those hired after 2004 and
then add back those who quit during 2004 to give me the base number on
January 1st, 2004.

Formulas I've used are as follows (along with their results) ---

**Counting all Actives
=COUNTIF(A1:A5403,"Active")
Nice and easy, and equals 747.

**Counting all those hired after 2004
=COUNTIF(I1:I5403,""&DATE(2004,12,31))

A bit more complicated, but works quite nicely. I originally had HUGE
problems due to a sorted list and the dates being input as '12/28/2000
etc... I think the ' was buggering everything. Data -- Text to Columns
fixed it.

**Counting all those who quit DURING 2004 [ie. Jan1st'04<= and
<Dec31st'04
.... this is where I'm stumped. I know that COUNTIF does not accept
multiple arguments but dont know what to use in place of it.

If anyone has some advice, please lend it!

PS - this NG is great, never seen such helpful knowledgeable people

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
S Davis
 
Posts: n/a
Default Counting dates in a RANGE (yargh!) :)

Step three (counting dates between ranges) works by using:

=SUMPRODUCT(--(FM!J$3:J$5403$E$1),--(FM!J$3:J$5403<=$G$1))

.... where E1 and G1 are the date "limits", respectively :)

Quite happy to have this finished! Hopefully this can help someone in
the future.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Counting dates in a RANGE (yargh!) :)

Here's an alternative:

You only need to test for the year:

=SUMPRODUCT(--(YEAR(FM!J$3:J$5403)=2004))

Biff

"S Davis" wrote in message
ups.com...
Step three (counting dates between ranges) works by using:

=SUMPRODUCT(--(FM!J$3:J$5403$E$1),--(FM!J$3:J$5403<=$G$1))

... where E1 and G1 are the date "limits", respectively :)

Quite happy to have this finished! Hopefully this can help someone in
the future.



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
How do I create a schedule from a list of dates ? Gavin Morris Charts and Charting in Excel 2 October 28th 10 04:08 PM
Counting data columns with dates Manni Excel Discussion (Misc queries) 2 April 11th 06 02:05 PM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 2 May 2nd 05 08:53 AM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 0 April 7th 05 12:47 AM
Finding Dates in a date range Marcus Excel Discussion (Misc queries) 1 April 5th 05 01:51 AM


All times are GMT +1. The time now is 03:05 PM.

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

About Us

"It's about Microsoft Excel"