View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
junoon
 
Posts: n/a
Default Count dates falling in a certain range

Hi All,

I have a list of employee names & their joining dates.

i want to know which employees fall into which category i.e.

1] <90 days from today()
2] between 91-180 days from today()
3] 180 days

there are 3 cells in a row (on top right corner of data list ) labelled
:

<90 90-180 180
[formula here] [formula here] [formula here]

Till now, i have created 4 columns:

1st column formula: today()-cell containing 1st date in list & dragged
it down to fill other cells.

2nd column formula: if(1st col<90, 1, 0) & dragged down to fill other
cells....

3rd column formula: if(and(1st col=90,1st col=<180),2,0) & dragged
down.....

4th column formula: if(1st col180,3,0) & dragged down to fill......


Then i have totalled the columns down using Countif function:

2nd col: Countif(2nd col_range,"1")

3rd col: Countif(3rd col_range,"2")

4th col: Countif(4th col_range,"3")

then i have copied the results into the 3 cells in the top right corner
& using the results i have made a pie Chart to show the ratio.....

I dont want to make extra columns as it does not look neat. What i want
is readymade formulas which i can directly enter into the 3 cells to
get the ratios automatically, but i have racked my brains & no luck
yet!

I have even tried using Advanced filter but dont know how to get it to
work....

Could any brainy people out there help me please????

Rgds,

Junoon