Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Dave,
Interesting solution. Given that my workbook contains over 130 columns, and over 550 rows of data, I'm reluctant to add the 6 additional hidden columns needed to do the job. The file size is huge as it is! Thanks all the same. I will definitely keep your solution in mind for future workbooks. Bob "Dave Peterson" wrote: I'd use a UDF like this: Option Explicit Function IsFormula(rng As Range) As Boolean IsFormula = CBool(rng.Cells(1).HasFormula) End Function Then I could put a formula in another cell (say B1) =isformula(a1) (and hide that column???) And use that cell for data|validation Custom =B1=TRUE But be aware that =1234 is a formula. Bob wrote: Ken, The reason I am not using Excel's protection capabilities is because the workbook is "shared" and uses macros. Once shared, you cannot protect/unprotect a workbook. Hence, the reason I need to use Validation rules. Bob "Ken Puls" wrote: Personally, I would create a style that has the "Locked" flag selected (as it is by default). Highlight the entire sheet and unlock all the cells, then apply the style to your formula cells only. Protect the sheet and you're done. Is there any special reason why you're trying to protect your formula via a validation rule and not the built in protection methods? Ken Puls, CMA - Microsoft MVP (Excel) www.excelguru.ca Bob wrote: A member of this forum provided the following UDF to display a formula within a cell: Function GetFormula(Cell As Range) As String GetFormula = Cell.Formula End Function I tried creating the following €œcustom€ Validation rule for cell A1 (which happens to contain a formula): =LEFT(GetFormula(A1),1)="=" but it is not working correctly (I get a €œNamed range cannot be found€ error message). I want to ensure that someone doesn't inadvertently over-write a cell containing a formula. Can anyone show me how to do this using a Validation rule? I am aware of a solution using Conditional Formatting, but I really need to use a Validation rule. Any help would be greatly appreciated. Thanks, Bob -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Validation Error | Excel Worksheet Functions | |||
Please help with Statistics Formulas in Excel | Excel Discussion (Misc queries) | |||
Formulas not recognizing new data | Excel Discussion (Misc queries) | |||
validation rule | Excel Worksheet Functions | |||
Data Validation Window? | Excel Discussion (Misc queries) |