ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Hiding and locking formulas (https://www.excelbanter.com/excel-worksheet-functions/232419-hiding-locking-formulas.html)

Kay

Hiding and locking formulas
 
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


--
KK

Bernard Liengme[_3_]

Hiding and locking formulas
 
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
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Kay" wrote in message
...
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


--
KK




Jacob Skaria

Hiding and locking formulas
 
Right click from the cell FormatCellsProtectioncheck '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 ToolsProtectionProtect sheet

If this post helps click Yes
---------------
Jacob Skaria


"Kay" wrote:

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


--
KK


Shane Devenshire[_2_]

Hiding and locking formulas
 
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)

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

Cheers,
Shane Devenshire


"Kay" wrote:

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


--
KK


Jacob Skaria

Hiding and locking formulas
 
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
--
If this post helps click Yes
---------------
Jacob Skaria


"Kay" wrote:

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


--
KK


Shane Devenshire[_2_]

Hiding and locking formulas
 
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


"Kay" wrote:

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


--
KK


Kay

Hiding and locking formulas
 
Formulas worked! Thank you all.
--
KK


"Shane Devenshire" wrote:

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


"Kay" wrote:

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


--
KK



All times are GMT +1. The time now is 08:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com