Making certain cells unchangeable

philiplynch

New Member
Joined
Aug 20, 2007
Messages
11
Hi,

I am preparing an excel spreadsheet to be used as an order form. There are certain columns that I do not want customers to be able to change, for example unit price, but I would still like them to see it. Is it possible to have only certain fields that can be changed and others that are protected?

Thanks.
 
Hi guys, I really appreciate your help so far. Thank you so much. I am still having trouble with this. I will tell you what I did. I selected 5 of the 6 columns, and under Protection selected Locked. The first cell is user specified so I kept that one unlocked. Then I Protect Workbook and select Structure, and type in a password. Everything is fine, until I close and open the document again, then I can STILL change the values and save it.
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
This might be a stupid question, but did you save it after protecting and before you closed and opened it again?
 
Upvote 0
Try this step by step:
Open a brand new worksheet
Highlight cells A1:A10 and go Format>Cells>Protection
Un-tick the Locked box
Click OK
Go to Tools>Protection>Protect Sheet

At this point it depends what version of Excel you are running, but in 2003 ensure that the “Protect worksheet and contents of locked cells” box is ticked. Then enter a password and click OK.

Confirm the password and click OK

You do not then need to close and/or save the worksheet. The result should be instant. Try entering something in A1:A10, this should be fine. Any other cell should tell you that the worksheet is protected and you can’t edit its contents.
 
Upvote 0
EDIT

Hi all :-D

Leading on from this funnily enough this is something i have been playing around with also and i had an idea which may help if it can be adapted.

I have columns i dont want changing so playing around with VBE (Which i know very little of)...i was thinking.....
I have my data in column A.....I have the same data somewhere obscure somewhere like A:AZ perhaps hidden..?

Some code like:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Sheets("Sheet1").Range("A1:A10") <> Range("AZ1:AZ10") Then
MsgBox "You cannot change the values", vbOKOnly, Warning!
End If
End Sub

Then perhaps when you press OK it either performs edit undo last action OR it copies the whole column from the hidden range and puts it back in the column where the deletion was attempted......?

I know the code needs lots of work i just thought id add to this post rather than starting a new one!

Thanks
 
Upvote 0
Try this step by step:
Open a brand new worksheet
Highlight cells A1:A10 and go Format>Cells>Protection
Un-tick the Locked box
Click OK
Go to Tools>Protection>Protect Sheet

At this point it depends what version of Excel you are running, but in 2003 ensure that the “Protect worksheet and contents of locked cells” box is ticked. Then enter a password and click OK.

Confirm the password and click OK

You do not then need to close and/or save the worksheet. The result should be instant. Try entering something in A1:A10, this should be fine. Any other cell should tell you that the worksheet is protected and you can’t edit its contents.

Oh man Lewiy, thanks so much.... I made a stupid mistake. When I went to protect the sheet, I selected Protect workbook instead of sheet. Oops. Thanks for your help!!!
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,112
Members
452,302
Latest member
TaMere

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