Under the Freeze panes, Excel currently offers Freeze panes, Freeze first row and Freeze first column options.
I was looking for an option where I can freeze the first N-columns.
I did a record macro to find out what Excel was doing when Freeze first column option was selected and it showed this:
Sub Macro1() ' Macro1 Macro With ActiveWindow .SplitColumn = 1 .SplitRow = 0 End With ActiveWindow.FreezePanes = True End Sub
But what actually is happening is a split column than the freeze pane function.
So when I changed the
.SplitColumn=4, I ended having a split than freeze panes.
Is there a workaround for this or is this suppose to work only this way?