Freeze rows or columns
Freeze Panes freezes the rows above and the columns left of the selected cell.
Freeze the first two columns
Select the third column.
Select View > Freeze Panes > Freeze at selection.
Freeze columns and rows
Select the cell below the rows and to the right of the columns you want to keep visible when you scroll.
Select View > Freeze Panes > Freeze Panes.
Unfreeze rows or columns
On the View tab > Freeze Panes > Unfreeze Panes.