Locking Columns/Rows Together?

Dishboy09

New Member
Joined
Jun 11, 2017
Messages
34
Office Version
  1. 365
Platform
  1. Windows
I am attempting to find a way to lock my top row, AND 8 columns on the right side of my page so that they stay locked with the top row.

Any ideas on how/if this could be attained?
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Try this

Select cell I2
Click View tab \ FreezePanes\Freeze Panes
 
Upvote 0
Try this

Select cell I2
Click View tab \ FreezePanes\Freeze Panes


That locks all of the columns up to that point though. Im needing the first 20 columns free scrolling and the last 8 to be locked.
 
Upvote 0
How about selecting U2 and ViewTab\ SplitScreen
Hop into bottom left quadrant
If that won't do, then VBA is the answer
 
Last edited:
Upvote 0
Without VBA

Lock top row using Freeze Frame
Select columns A to T
Right click \ Format Cell\ Protection tab \ uncheck "Locked"
Protect the worksheet - do not allow user to select unlocked cells

Prevents straying outside your limits
 
Last edited:
Upvote 0
With VBA

Lock the Top Row with Freeze Frames

Place in sheet module
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Column > 20 Then Cells(Target.Row, 20).Activate
End Sub
 
Upvote 0
With VBA

Lock the Top Row with Freeze Frames

Place in sheet module
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Column > 20 Then Cells(Target.Row, 20).Activate
End Sub



Placed code into view code tab, and still only the top row is locked. Am i doing something wrong?
 
Upvote 0
Sounds like you have done everything correctly
Events trigger may be disabled

Save, Close and Re-Open the workbook - should then be ok
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,624
Latest member
gregg777

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top