Hiding Formula In Cell

Front

Board Regular
Joined
Oct 26, 2021
Messages
54
Office Version
  1. 2016
Platform
  1. Windows
I am having issue with my table expanding when I protect my sheet. So as a work around I am using VBA to unprotect and then protect when a new entry is added. This works, but it breaks other functions on the table. So I am wondering if there is a way to have the sheet unprotected normally, then if someone tries to click on a cell that has a formula in it, the VBA would automatically protect the sheet. Then if another cell is clicked on it would unprotect it. Is something like that possible? That way I would not lose the functions I need.
 
@Front unless you provide an example of where your formulas are I don't think your quest will be achieved. We can't guess @ what you are dealing with.

I am thinking maybe a Worksheet_SelectionChange might work for you but without knowledge of where your formulas are, it is kind of difficult to offer some code.
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Another problem I see is if you are inserting/deleting lines, that will fubar this type of approach.
 
Upvote 0
I think I might have a solution, but like I mentioned previously, we need to know where the formulas are.
 
Upvote 0
@Front, I am still waiting to here where the formulas are located.

I think I have code that protects the formulas, but I need to know where those formulas (Address ranges) are located in order to hide them. Are they all in a column or columns, maybe all in a row or rows? Maybe post an example with xl2BB?
 
Upvote 0

Forum statistics

Threads
1,214,589
Messages
6,120,415
Members
448,960
Latest member
AKSMITH

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