kol:=0; Sum:=0; for i := 1 to StringGrid1.RowCount-1 do if ((StringGrid1.Cells[0, i] = 'Жен') and (StrToInt(StringGrid1.Cells[2, i]) < 50)) then begin Sum := Sum + StrToInt(StringGrid1.Cells[4, i]); inc(Kol); end; Srob:=Sum/Kol;