Label3.Caption:=''; очистка метки 3
for i:=1 to stringgrid1.colcount do для «и» от 1 до последней
for e:=1 to stringgrid1.rowcount do для «Е» от1 до последней
if StringGrid1.Cells[e-1,i-1]=Edit3.Text then
If RadioButton1.Checked=True then
Label3.Caption:=Label3.Caption+inttostr(e)+','
else
Label3.Caption:=Label3.Caption+inttostr(i)+',';
end;