Select the column header button or row header button.
Click the Home tab. Click the Delete Cells button. Then click Delete Sheet Columns or Delete Sheet Rows.