Conditional format if a cell has a formula or if a percent or numb

W

wrightlife11

I need to change the color of a cell that contains a complicated formula if
someone types in a value. Any Ideas?

M
 
G

Gord Dibben

If someone types in a value, there will no longer be a complicated formula.

You would be better off protecting that cell from editing using
Format>Cell>Protection followed by Tools>Protection>Protect Sheet.

But.....................to answer your question.

Copy/paste this UDF to a General Module in your workbook.

Function IsFormula(cell)
Application.Volatile
IsFormula = cell.HasFormula
End Function

Select the cell to change color and Format>Conditional Formatting>Formula is:

Assuming the selection to be A1

Formula is: =NOT(IsFormula(A1))


Gord Dibben MS Excel MVP
 
Top