View Single Post
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

You probably will be a lot happier if you use a Pivot Table. See

http://peltiertech.com/Excel/Pivots/pivotstart.htm


But for a formula solution:

=SUMPRODUCT(--(A1:A100=D1),--(B1:B100=D2),C1:C100)

where D1 contains the Station number and D2 contains the error code


See

http://www.mcgimpsey.com/excel/doubleneg.html

for an explanation of the "--".


In article ,
"BMSpell" wrote:

I would like some help on a nesting function. I have 3 columns of
data on a spreadsheet. The first column identifies a station. The second
station list an error code, entered in text, such as the words "mechanical
failures" or "adjustments". The 3rd column list downtime the station had,
in a numerical value, such as 10 20 or 30 minutes for the specific entry
Station Error Code Downtime
20.3 Adjustments 10
20.3 Mechanical Failures 10
40 Pneumatic Failure 5
40 PM's / Cleaning 5
40.5 Lack of components 10
50 Specialists TEF/MFE 30
50 Electrical Failures 25

How would I go about writing a function where, say for example, I could
get a sum for the enries of dowtime for all the "Mechanical Failures" for
Station "20.3" , basically setting 2 conditions which have to be met in
order to add up the downtime. Thanks.