Table formulas protection

kakiebos

Board Regular
Joined
Jun 10, 2018
Messages
62
Hi Everyone.

I need some help again.

I have a sheet for a health check history report on a machine. This is completed on a monthly basis to get some trends on the machine. Some of the inputs are then used to calculate the expected life of the machine to predict when components are to be replaced on a planned repair, instead of on a breakdown.

To do this I want to use a table and some of the columns will have formulas. The reason for the table is its useful functionality with regards to adding new rows and copying the formulas.



My issue now is to protect these formulas and possibly the sheet as well. If I protect the sheet, my formulas is protected, but I loose the table functionality with regards to adding new rows and copying the formulas.

Is there a workaround for this, either in Excel itself or with a VBA script?

Thank you in advance for your assistance.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Upvote 0
hmmm.
Is a macro ok?
You could try this as a worksheet macro:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim v, r as Range
    If Target.Count = 1 Then
        Application.EnableEvents = False
        v = Target.Value
        Set r = Selection
        Application.Undo
        If Target.Formula = CStr(Target.Value) Then Target.Value = v
        Application.EnableEvents = True
        r.Select
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,327
Messages
6,124,294
Members
449,149
Latest member
mwdbActuary

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top