Hiding and locking formulas

K

Kay

Is there a way for me to do the following in a worksheet?
Hide formulas and lock them from editing
Lock cells to prevent editing
For worksheets that require information filled in- is there a way to
automatically let you do the first cell before moving on to the next
 
B

Bernard Liengme

Unlock the cells where the user is to enter data then protect the worksheet
In the protection dialog (XL 2003 and XL2007) limit the users to unlocked
cells
Now user cannot see or change formulas
This is OK to prevent careless errors but is no great security since there
are dozens of password un-lookers around
best wishes
 
J

Jacob Skaria

Right click from the cell Format>Cells>Protection>check 'Hidden'. Also check
'Locked' if you want the cells protected and click OK. This will allow the
formula to work without displaying.. For cells which are to be filled leave
them unchecked and protect the sheet Tools>Protection>Protect sheet

If this post helps click Yes
 
S

Shane Devenshire

Hi,

Or the menu/ribbon way:

2003:
1. Select all the cells you want the user to be able to work in and choose
Format, Cells, Protection, and uncheck Locked.
2. Select all the cells you want to lock and hide formulas for and choose
Format, Cells, Protection, and check Hidden and if necessary check Locked
3. Choose Tools, Protection, Protect Sheet (Optional - add a password)

2007:
1. Select all the cells you want the user to be able to work in and choose
Home, Format, and turn off Locked Cells.
2. Select all the cells you want to lock and hide formulas for and choose
Home, Format, Format Cells, Protection, and check Hidden and if necessary
check Locked
3. Choose Review, Protect Sheet (Optional - add a password)
 
J

Jacob Skaria

Kay, the last part of you question..You can use the below code to make sure
the first cell is filled. Change the reference to suit your requirement.
Right click the sheet tab and paste the below code and try.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Trim(Range("A1")) = vbNullString Then
MsgBox "Enter data in cell A1"
Application.EnableEvents = False
Range("A1").Activate
Application.EnableEvents = True
End If
End Sub
 
S

Shane Devenshire

Hi,

Missed that other question -

If all you want to do is require an entry in the first cell then before any
other cells are filled in, then you don't need a macro.

Let's suppose for a moment that you want A1 filled in before any other cells
allow data entry

1. Select the entire spreadsheet
2. Choose Data, Validation, pick Custom from the Allow list
3. In the Formula box enter
=$A$1<>""
4. Uncheck Ignore blank
5. Click OK.
6. Select just cell A1 and choose Edit, Clear, Format.
 
K

Kay

Formulas worked! Thank you all.
--
KK


Shane Devenshire said:
Hi,

Missed that other question -

If all you want to do is require an entry in the first cell then before any
other cells are filled in, then you don't need a macro.

Let's suppose for a moment that you want A1 filled in before any other cells
allow data entry

1. Select the entire spreadsheet
2. Choose Data, Validation, pick Custom from the Allow list
3. In the Formula box enter
=$A$1<>""
4. Uncheck Ignore blank
5. Click OK.
6. Select just cell A1 and choose Edit, Clear, Format.

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top