Which kind of lock do you need?
Stop people changing what's in a column
Lock those cells, unlock the rest, then protect the sheet.
Stop people adding, deleting or renaming columns
Protect the sheet with Insert columns and Delete columns left unticked, and the header row locked.
Keep a column on screen while scrolling
That's Freeze Panes, not protection.
Lock a column so it can't be edited
Every cell in Excel is marked Locked from the start, but locking only takes effect once the sheet is protected. So unlock everything, lock just the columns you want, then protect the sheet. The steps are the same in Excel for Windows and Mac.
Unlock the whole sheet
Click the corner box above row 1 to select every cell, press Ctrl+1 (Cmd+1 on a Mac) to open Format Cells, and on the Protection tab untick Locked.
Lock the columns you want to protect
Select those columns by clicking their letters (hold Ctrl, or Cmd, to pick several), open Format Cells again and tick Locked.
Protect the sheet
On the Review tab, click Protect Sheet. Add a password if you want one, leave Select unlocked cells ticked, and click OK.
Test it
Try typing in a locked column: Excel says the cell is protected. Unlocked columns work as normal. To make changes later, click Review, Unprotect Sheet.
Stop people adding, deleting or renaming columns
This is what keeps a template's layout intact, so the file you get back still matches your import. It's the same Protect Sheet dialog, with a few choices made deliberately.
Lock the header row
Unlock the whole sheet as above, then select row 1 and tick Locked in Format Cells, so nobody can rename a column.
Leave insert and delete unticked
In Review, Protect Sheet, leave Insert columns, Delete columns, Insert rows and Delete rows unticked. They're unticked by default.
Allow what people do need
Tick Format columns if people should be able to widen columns, and Sort and Use AutoFilter if they filter the data. Click OK.
Protection still can't stop someone copying your sheet into a new workbook and sending that back. If the layout really matters, see how to stop clients changing your Excel template.
Keep a column in view while scrolling
If "locking" means keeping a column visible as you scroll sideways, you want Freeze Panes. It doesn't stop anyone editing.
Just the first column
View, Freeze Panes, Freeze First Column.
Several columns
Select the column to the right of the last one you want to keep, for example column D to keep A to C, then View, Freeze Panes, Freeze Panes.
Undo it
View, Freeze Panes, Unfreeze Panes.
In Google Sheets
Protect a column
Select the column, then Data, Protect sheets and ranges, Add a sheet or range. Click Set permissions and choose who can edit it, or Show a warning to let people edit after a prompt. You can always edit your own protected ranges.
Keep a column in view
View, Freeze, then 1 column or up to the selected column.
Common problems
Nobody can type anywhere
Every cell in Excel starts out locked, so protecting the sheet without unlocking the data entry cells first locks everything. Unprotect the sheet, unlock the cells people should fill in, and protect it again.
The column you locked can still be changed
Locking does nothing until the sheet is protected. Check Review shows Unprotect Sheet, which means protection is on.
Sorting and filtering stopped working
On a protected sheet, tick Sort and Use AutoFilter in the Protect Sheet dialog, and remember Excel only sorts unlocked cells. Add filter buttons before protecting the sheet.
People still pasted over the headers
Protection only covers locked cells. If row 1 is unlocked, pasting can rename every header. Lock the header row along with the columns.
Nobody remembers the password
Excel can't recover a lost sheet password. Keep it with the master copy, or leave it blank: protection without a password still stops accidental changes.
Expecting it to keep data safe
Sheet protection stops accidents, not determined people: anyone can copy the data into a new workbook. And it disappears when the file is saved as CSV, so check the file you get back.
Collecting data with a template?
Send a form instead of a locked spreadsheet. People fill in your columns but can't add, remove or rename them, every value is checked as it's typed, and the CSV they download keeps your exact headers.
Start building free