# I need an excel formula

I need an excel formula to calculate the average number of days for a specific Project ID, and display the results only once. I cant tell you how bad a screwed up the syntax on this one!

See the attached for an example.
9-28-11.xlsx
LVL 1
###### Who is Participating?

Commented:
In F2:
=IF(A2=A1,"",AVERAGEIF(\$A\$2:\$A\$25,A2,\$D\$2:\$D\$25))
then copy down.
0

Commented:
Easiest is to use a pivot table, like this :  9-28-11.xlsx
0

Commented:
If I were you I'd do a pivot table. Project ID in the row field and (Average of) Days in the data field.
0

Commented:
Here's an example:

=AVERAGEIF(A2:A25,J2,D2:D25)

Where J2 is the project Id, which is matched with A2:A25, and the average based on that comes from the data in D2:D25

See example attached,

9-28-11.xlsx
0

Commented:
Missed the refresh!
0

Author Commented:
Perfect! thanks to tall for the help, but this is the better solution for this particular situtation
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.