Protect of Single Row or Column

K

Khalil

Hi Experts:

Plese advise that how can i protect a single row or column through any
functon or macro.

thanks in advance
khalil
 
J

JBeaucaire

By default, all cells in a worksheet are "protected" when you click on TOOLS
PROTECTION and activate protection on the sheet or the workbook.

But if you highlight all the cells you want to still be able to edit when
the sheet is protected and got to FORMAT > CELLS > PROTECTION and uncheck the
protection box, protecting the sheet won't affect these cells.

So this is the opposite of what you asked. This is how you set certain cells
to STILL be editable when you've locked your sheet. But it gives you what you
need. The column you want to stay protected, leave the protection flag on for
that column, then protect the sheet.
 
M

Mike H

Hi,

As your other respondent has pointed out by default all cells are locked
but this only becomes 'active' when the sheet is protected so you would start
by selecting all cells then

Format|Cells - Protection tab and remove the locked checkmark

This macro then activates 'Locked' for a row of your choosing

Sub Prime_Lending()
ActiveSheet.Unprotect Password:="MyPass"
Rows("1:1").Locked = True
ActiveSheet.Protect Password:="MyPass"
End Sub

Mike
 
X

xlmate

me no expert but share with you what I know

try :
1) Highlight the whole sheet
2) Select Cell under Format in the menu bar
3) Go to Protection tab
4) uncheck Locked, click OK
5) Select or highlight the row or column you want to protect
6) Go Cell under Format again
7) Go to Protection tab and check the Locked, click OK
8) Protect the sheet via Tool >> Protection

--
Hope this is helpful

Appreciate that you provide your feedback by clicking the Yes button below
if this post have helped you.


Thank You

cheers, francis
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top