Can I lock a column so it doesn't get sorted?

Occasional Contributor

I have created a table on a sheet in excel. I made the first column a column of numbers, 1-100, so that when I print it all my rows will be numbered for easy reference. ie. me telling "Joe" look at line 54 and check that part out in the shop and inspect it. My problem is I just want a numbers 1-100 column for visuals when I print it. But when Im using it in excel and sorting data, all the numbers in that column get sorted with the data that's in that row, but my numbers column isn't part of the data. Can I lock that column somehow so that it doesn't get sorted but the rest of the row does?

8 Replies



Instead of sequential numbers you may use in first column something like


if you data starts from row 2


You can also tell Excel to include row numbers and column letters in the printout (checkbox on the Sheet tab of the page setup settings dialog).
best response confirmed by Bryan Kospender (Occasional Contributor)

I ended up just creating a column to the left that wasn't included in the table that was numbered.



Have you tried Sergei's solution?

No, I am a novice and I don't really know what he means.

I know your tip is 5 years old, but it's great!


Thank you, in modern Excel SEQUENCE() works great.

I appreciate that update. After a bit more Googling, saw that function too! Thanks again!