function IsCellSelected(StringGrid : TStringGrid; X, Y : LONGINT): BOOLEAN; begin Result := false; try if (X >= StringGrid.Selection.Left) and (X <= StringGrid.Selection.Right) and (Y >= StringGrid.Selection.Top) and (Y <= StringGrid.Selection.Bottom) then Result := true; except end; end; procedure TForm1.Button1Click(Sender: TObject); begin if IsCellSelected(Stringgrid1,2,2) then begin ShowMessage('Cell 2,2 is selected'); end; end;