Select the columns header buttons or rows header buttons.
Click the Home tab. Click the Delete Cells button. Then click Delete Sheet Columns or Delete Sheet Rows.