Select the cell below the rows and to the right of the columns you want to freeze
Go to the View tab
Click Freeze Panes
Choose Freeze Panes from the dropdown
To freeze only the top row, go to View, click Freeze Panes, then choose Freeze Top Row
To freeze only the first column, go to View, click Freeze Panes, then choose Freeze First Column
To unfreeze rows and columns, go to View, click Freeze Panes, then choose Unfreeze Panes
