1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 procedure TForm2.Button2Click(Sender: TObject); var i, j, k: integer; max:integer; begin with StringGrid1 do for j:= 0 to ColCount - 1 do begin k:= 0; max:= StrToInt(Cells[j,0]); for i:= 0 to RowCount - 1 do begin if StrToInt(Cells[j,i]) > max then begin max:= StrToInt(Cells[j,i]); k:= i; end; end; StringGrid2.Cells[j,k]:= '0'; end; end;