MS-Excel: Add restriction to a cell

Asked By 10 points N/A Posted on -
qa-featured

In Excel, how can I add restrictions to a cell for editing such as only particular users can revise it? And how do I print the full path of a workbook under page header?

Any help will be appreciated. 

Thank you.

SHARE
Best Answer by AshikQues
Best Answer
Best Answer
Answered By 0 points N/A #118048

MS-Excel: Add restriction to a cell

qa-featured

First one: In Excel if you want to restrict to any cell/sheet/workbook go to tools then protection; by this protection you can restrict other not to edit.

Second: Go to View then Header and footer then custom Header. Please check out the screen shoot its easy to understand.

Header and footer Page Setup
Answered By 0 points N/A #118050

MS-Excel: Add restriction to a cell

qa-featured
How can I add restrictions to a cell for editing such as only particular users can revise it?
 
1) First of all you have to un-protect every cell in your Excel sheet. To do so, you have to select all columns and row, now right click and from pop up menu select the "Format Cells". After clicking this, a window will appear, now click on the Protection tab, now from the check box, uncheck "Locked" and click OK.
 
2) Next step is to click on the cell you want to protect, right click and from pop up menu click "Format cells". Now from the "Format Cells" window click on the Protection tab and click on "Locked" to check it. Press OK.
 
3) To apply this to the cells, you have to protect your worksheet. To do so, Click on the "Tools" tab of the Excel, and click on "Protection" and then go to "Protect Sheet" from the menu. A popup menu will appear, which will prompt you for the password, make sure this password is optional. If you wish you can enter a password, make sure contents are checked and click OK. The password you entered will be used to prevent others from unprotecting the sheet.
 
4) For restricting so that particular users can revise it, Click on "Tools", and select "Options" from the drop down menu. Now click on the "Security" tab from the "Options" window. Now you can enter two different passwords to Enhance your security. You can enter the "password to open" and "password to modify" and click OK. Make sure you enter two different passwords for security.
 
How do I print the full path of a workbook under page header?
 
1) First of all copy the Code that will help you to print the full path of a workbook under the page header. The Code is given below.
 
Private Sub Workbook_BeforePrint(Cancel As Boolean)
 
Dim WS As Worksheet
For Each WS in Worksheets
WS. PageSetup. Left-hander = ThisWorkbook. Full Name & " " & _ 
Worksheets ("Sheet2"). Range ("A5"). Value
Next WS
End Sub
 
2) Now go to your workbook in which you want to apply these settings, Hold the "ALT" key and press "F11" key simultaneously. It will open the Visual Basic Editor.
 
3) On the left side of the Visual basic Editor, Double click on the "ThisWorkBook" and paste the code where the cursor is prompting in the editor.
 
4) Click on the Run button which is green in color which is just below the Main menu. Now go to "File" and click on Save.
 
5) Close the Visual Basic Editor and the job is done, You will find the Path under the header.
 
Visual Basic Editor

Login/Register to Answer

Related Questions