Freeze the Top Row
SelectViewon theribbon.
If you’re using Excel for Mac, skip this step.
A border appears just below Row 1 to indicate that the area above the line has been frozen.

The data in row 1 remains visible as you scroll because the entire row is pinned to the top.
Freeze the First Column
To freeze the first column of a worksheet:
SelectView.
The entire column A area is frozen, indicated by the black border between columns A and B.

These are the rows and columns that will stay visible when you scroll.
Two black lines appear on the sheet to show which panes are frozen.
The rows above the horizontal line are kept visible while scrolling.
The columns to the left of the vertical line are kept visible while scrolling.
To unfreeze panes, selectView>Freeze Panes>Unfreeze Panes.
On Excel for Mac, selectView>Unfreeze Panesinstead.