Select the column to the right of the columns or select the row below the rows.
To freeze both, click the cell to the right and below of the column and row you want to freeze.
Click the View tab. Click the Freeze Panes button.Click Freeze Panes to keep rows and columns visible based on the current selection.Click Freeze Top Row to keep top row visible. Click Freeze First Column to keeps first column visible.
Freezed columns or rows are marked by a solid line.