A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Dear Customer,
Regarding your inquiry about freezing only row 8 in Excel without freezing rows 1-7, Excel’s default functionality does not support this directly. Typically, the Freeze Panes feature locks all rows above the selected row.
However, there is a workaround using VBA (macros). Please give it a try to see whether it works.
- Open your Excel workbook and press Alt + F11 to open the VBA Editor.
- Click Insert → Module.
- Paste the following VBA code:
vba
Sub FreezeRow8Only()
With ActiveWindow
.SplitColumn = 0
.SplitRow = 8
.FreezePanes = True
End With
End Sub
- Close the VBA Editor and return to Excel.
- Run the macro by pressing Alt + F8, selecting FreezeRow8Only , and clicking Run.
- If you need to undo this action, use the following VBA command:
vba
Sub UnfreezePanes()
ActiveWindow.FreezePanes = False
End Sub
I understand this may not be a perfect solution, and I appreciate your feedback on this limitation. If you’d like Microsoft to consider adding direct functionality for this in future updates, we encourage submitting a feature request via our official channels Ideas · Community.
Please let me know if you need further assistance!
Best regards,
Doris V - MSFT | Microsoft Community Support Specialist