View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Use cell in calculation only if offset cell contains data

Jonnie,

SUMPRODUCT should do it

This gives the column F numbers

=SUMPRODUCT(($C$1:$C$7=2032)*($F$1:$F$7))/COUNTIF($C$1:$C$7,2032)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jonnie" wrote in message
om...
I have an Excel spreadsheet that tracks performance numbers for
different departments. Each department is assigned a number in column
C, while columns D and E contain first name and last name
respectively. Column F contains certain perfomrance numbers. What I am
trying to do is have a cell that calculates the average performance
for each department. I want to have a sell for each departments
averages and have it only use the data in cells F through K that has
the proper department code in column C. I was looking at a nested IF
statement, but I am not sure which way to go. Below is a copy of
basically what I am dealing with. Any help would be appreciated.

John

C D E F G H I J
K
2032 Smith Don 1331 2:46 0:23 3:09 194:31:30 29:14:06
2157 Doe Matt 1665 3:22 0:38 4:00 174:19:45 26:44:11
2069 Cul Don 446 2:58 0:19 3:17 57:07:41 7:30:14
2032 Dan Larry 504 2:04 0:47 2:51 53:15:10 4:25:02
2069 Ups Michele 1470 3:16 1:02 4:18 175:03:14 33:57:50
2114 Tray Love 1710 2:05 0:33 2:38 158:09:00 21:26:35
2114 Uncle Ryan 1085 3:05 0:30 3:35 184:24:02 35:12:20
Average 1173 2:48 0:36 3:24 142:24:20 22:38:37