• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Can we freeze panes for only a part of the sheet and keep other part as normal

max4asd

Member
Guys hello,


Good Day


I am having a data with 10 columns and 1000 rows of data i want to use freeze panes from column 2 and row 1 which will will enabe me to scroll down or up by fixing the view from column 2 and row 1 but this rule is effecting the entire sheet wha i need is to have freeze panes up to column 10 then after column 10 the sheet should not scro11 down or up even if i am scrolling the sheet in the first 10 columns.


I thanks and appriciate your efforts in advance to know how can we acheive this in excel could any boby can help me on this.
 
Max,


Is you need the scroll area to be fixed then you may use the belo code for the same.


Worksheets("Sheet1").ScrollArea = "a1:f20"


adjust the range as per your requirements.


to scroll on the entire sheet again use the below code


Worksheets("Sheet1").ScrollArea = ""


~VijaySharma
 
Hey Max,


No worries...


1. Press ALT+F11 to get the VBA editor on the screen

2. Click on the Insert Menu and then click on Module

3. Paste the below code

[pre]
Code:
Sub FreezeArea()
Worksheet("Sheet1").ScrollArea = "a1:f20"
End Sub

Sub UnFreezeArea()
Worksheet("Sheet1").ScrollArea = ""
End Sub
[/pre]

After this you can close the VBEditor and in excel press ALT+F8 to get the macro dialog box, select any one that you want to run and click on the run button.


Please remember to change the name of Sheet1 to the actual name of the worksheet as display in excel and let us know the outcome.


Cheers

~VijaySharma
 
Back
Top