simonalcock
New Member
- Joined
- Oct 19, 2007
- Messages
- 2
Hi all,
I have a spreadsheet in which some cells have lost their formulas. The calculated value is still displayed, but it no longer updates with the rest of the sheet (as if F2, F9 had been pressed).
I need to find out which cells contain hard-coded numbers rather than formulas, and have been trying to use conditional formatting to highlight them for me.
I have a solution, but it seems to make the workbook terribly slow. If anyone has a simpler solution to this problem, I'd love to hear your ideas. My solution follows:
Define the following function in VBA:
Apply conditional formatting to the required range of cells, using the following formula to determine which cells to format:
I have a spreadsheet in which some cells have lost their formulas. The calculated value is still displayed, but it no longer updates with the rest of the sheet (as if F2, F9 had been pressed).
I need to find out which cells contain hard-coded numbers rather than formulas, and have been trying to use conditional formatting to highlight them for me.
I have a solution, but it seems to make the workbook terribly slow. If anyone has a simpler solution to this problem, I'd love to hear your ideas. My solution follows:
Define the following function in VBA:
Code:
Function IsFormula(cell As Range)
IsFormula = cell.HasFormula()
End Function
Code:
=AND(NOT(OR(isformula(A1),ISBLANK(A1))),ISNUMBER(A1))