Hide column and password protect

Copper Contributor

I am needing to hide a column until I am finished working on it.  I share the workbook with others to select inventory parts and one part is not ready to release until I receive some information hence why I would like to lock or password protect the hidden column.


Is there away to set a password after hiding the column or columns?

8 Replies
You've posted in the Community Discussion space, meant for questions directly about the Tech Community. I've moved your question to the Excel space for better visibility.


Hello Eric, I have the same question as bskipper but cannot find your answer. I need to hide one column in a worksheet that only is visible to me in case I have to change some data there.

I am not familiar with this app. Pardon me in case I don't use it and the English correctly.

Thanks ahead for answering

@Eifeltarzan Sorry for any confusion!

You are correct, I didn't answer the question. The question was originally posed in an incorrect part of the Tech Community, so I moved it to the correct one.


I am a community manager here in the Tech Community and not a product expert, so I'll leave this question to one of the Excel product experts! I hope you find a response soon.


Maybe I can help you with this information.
There are several ways to do this.

One of them is VBA (caution: not all excel / office versions can run VBA). there, in turn,

there are many sub-possibilities to accomplish this.

Example with a button, with a time lapse, with a click on a certain cell, etc.


Here a Simple macro for leaf protection Blade protection.

Press the ALT and F11 keys at the same time so that Excel immediately shows you the VBA editor window.

Sub blade protection ()
     ActiveSheet.Protect Password: = "Password Name", UserInterfaceOnly: = True, DrawingObjects: = True, Contents: = True, Scenarios: = True
End Sub

Sub Blade Protection Off ()
     ActiveSheet.Unprotect Password: = "Password Name"
End Sub

If you want to switch off the blade protection in a macro, you can do this in the macro with "Call Blade Protection Off" and activate it again with "Call Blade Protection".
If you assign a key combination to the macros e.g. (Ctrl + b) then you can quickly turn off the sheet protection u. turn on.
Hope you can do something with it.


There is also the possibility to do the half manually by changing the protection worksheet at the desired moment.


Protect a workbook



Protect a worksheet


You can change the language during these times by scrolling down and changing the language on the right.


I would be happy to know if I could help.



I know I don't know anything (Socrates)


* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.


Hi Nikolino, thank you for your competent answer that really solves what I wanted. Sorry my answer nearly 2 years too late. Today with the brand New Year 2022 I just casually registered your answer. So again Thank you very much, have a happy New Year and bleib gesund.
Nun Habe ich das Beispiel Makro übernommen. Erhalte aber einen Fehler bei der Ausführung. 'Sub blade protection ()' ist rot markier' und ich erhalte 'Fehler beim Kompilieren. Anweisungsende fehlt."


Enclosed the file with the VBA code.

Wasn't previously correctly described as a sub.

Also attached is the VBA code.


Sub Blade_Protection()
     ActiveSheet.Protect Password:="Password Name", UserInterfaceOnly:=True, DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub

Sub Blade_Protection_Off()
     ActiveSheet.Unprotect Password:="Password Name"
End Sub


It's always difficult to understand what it was about after such a long time, but now it's OK :)

It also took a year :))


Hope this information could help you.


Wish you a nice day...and year :).


I know I don't know anything (Socrates)

Thank you so kindly answering. I wish you a lot of joy , health and a lot of Gaudi all over this Happy New Year too. Now I need your help again. I am not experienced in handling the communication with Microsoft Tech Community. Surely I want to give you a like to your answer as I wanted yesterday for your answer over a year ago - and not recognized by me. Could you please tell me how I get it done :)