• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Need a macro to lock and hide all cells who have any data

Ram Mher

Member
Thanks in advance for guidance


For example- As i enter the data in any cell then its formatting should be as below:-
protect.contents=locked
protects.contents=hide
 
Hi,

It would mean the person who enters the info , will not have option to edit the same!

or you want to save, once the user enters info and saves the sheet, the above rules should apply?

Regards,
Prasad DN
 
HI Ram, do you mean to say that the User will not have access to enter the data..
Example - When user tries to enter or edit any cell, Excel should give error of Locked & hide???
 
Thanks to all of you for favouring.

@ prasaddn - Please find the attached workbook and refer macro.

Follow the mentioned Steps to understad issue clearly-
Make Group of all sheets in my workbook-
Press Ctrl1
go to protection tab
put check on "locked" and "hide"
Ungroup all sheet
Select "sheet4" and run macro

Formtting of all the blank cells shall be changed in "Sheet4" as below Locked=false and hide=false.

The above result i need on each sheet when i run this macro in my workbook
 

Attachments

  • Book1.xlsm
    20 KB · Views: 2
Thanks Mr. parth

your observation is correct. I have 20 sheets in my workbook and Before handover this workbook i want to lock and hide to those cells who have any constants or formulas in any sheet.
 
Back
Top