Determine if a cell in Excel contains a formula or function with this UDF (user defined function). This function returns "TRUE" if a cell contains a formula or function and "FALSE" if a cell does not contain a formula or function. This UDF works great in logical statements such as IF() statements, AND() statements, OR() statements, etc.
The most useful integration of this function is in conditional formatting. You can apply conditional formatting to the entire worksheet and use this function as the condition. Then, you will be able to view all cells that contain formulas or functions. And, if any cells change or more formulas or functions are added to the worksheet, you will instantly be able to see that these new cells contain formulas or functions and all without having to use a 'traditional' macro.
Function SHOWFORMULAS(rCell As Range)
SHOWFORMULAS = rCell.HasFormula
End Function