View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Conditional formatting if a cell contains a formula

Hi,

Try this. Alt +f11 to open vb editor. Right click 'This Workbook' and paste
the code below in.

The select your cell (say A1)and
Format|Conditional format
Formula is
=isformula(a1)
Pick a colour
OK

use format painter to copt the CF to other cells.


Function ISFORMULA(c As Range) As Boolean
ISFORMULA = c.HasFormula
End Function

Mike

"tsbarr" wrote:

I would like to apply conditional formatting if a cell contains a formula as
opposed to an entered number. I would think that is doable somehow using a
Formula Is condition, but I have not been able to figure it out. I thought
the cell function might be the one to use, but all I can see is being able to
evaluate if the cell contains a value, text or blank. The formula results in
a value, and an input number is a value, so going that route hasn't panned
out. If anybody has any suggestions, please let me know!

Thanks,
Tim