?
Solved

Lock specific columns

Posted on 2013-11-08
5
Medium Priority
?
250 Views
Last Modified: 2013-11-08
Folks,
I would like to only locked some specific columns in my worksheet: Columns H:O
0
Comment
Question by:Frank Freese
  • 3
  • 2
5 Comments
 
LVL 22

Expert Comment

by:rspahitz
ID: 39634025
The easiest way to do this is to select all of the other columns and unlock them (right-click and select Format cells, then click on the protection tab and de-selected the Lock checkbox.

With that done, turn on protection (Alt+H-O-P: Home tab, Cells group, Format selection, Protection item).  With that you will get a window, probably with the first two checkboxes selected.  Deselect the first one "Select locked cells" and click the OK button so that people can only select Unlocked cells.
0
 

Author Comment

by:Frank Freese
ID: 39634127
Got a problem here. I incorrectly stated my objective. I meant to say that columns H:O need the width to be "frozen" not locked. My fault.

"Columns A - I" have some cells that are not locked and the worksheet is protected.
Is there a way that when a worksheet is activated you can code what columns are frozen, not locked for a specific column range, such as H:O?
In range H2:O18 I have those cells unlocked.
0
 
LVL 22

Accepted Solution

by:
rspahitz earned 2000 total points
ID: 39634731
I think the default for protection is that the column resizing (formatting) is also locked.
I don't know of any events that Excel provides to indicate that a column is resized so you'd have to lock it and provide your own mechanism (like an overlaid button) to allow users to resize parts.
0
 

Author Comment

by:Frank Freese
ID: 39634924
rspahitz
thanks - not what I was wanting but not surprised.
Appreciate it!
0
 

Author Closing Comment

by:Frank Freese
ID: 39634925
many thanks
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question