View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Counting number of weeks to complete a task

On Sun, 13 Apr 2008 05:26:04 -0700 (PDT), wrote:

Hi,

Can anyone help me please.
I have a spreadsheet and I am trying to calculate how many weeks a
task took to complete.
The task does not necessairly have to be completed in consecutive
order.

A brief example:

Week Task
1 Painting
1 Painting
1 Drawing
2 Drawing
2 Drawing
2 Drawing
3 Painting
3 Drawing
3 Drawing

From the table the Painting task was completed in 2 weeks and the
Drawing task was completed in 3 weeks.

I would appreciate your help.


One way:

You could download and install Longre's free morefunc.xll add-in from
http://xcell05.free.fr/morefunc/english

Then use this **array** formula:

=COUNT(UNIQUEVALUES(IF(Task="painting",Week)))

To enter an **array** formula, hold down <ctrl<shift while hitting <enter.
XL will place braces {...} around the formula.

Task & Week are the named ranges for your data.
--ron