Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I understand conditional formatting but I don't see how it can help me. I'm looking at a sheet with many product entries and for most of them I get values from a table (vlookup) while for others I punch them in.

For example:

  • Cell b2 contents are =vlookup(a2,range,2,false) and what is displayed is 0.6

  • Cell b3 I know vlookup will fail (there is no data for the product in the range for a3) so I manually put in 0.8.

With over a hundred lines like this how can I program a highlight/Format condition to visually distinguish between those that were introduced manually from those retrieved with vlookup?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

With the aid of a UDF (user defined function) you can use Conditional Formatting:

Function IsFormula(r As Range) As Boolean
    IsFormula = r.HasFormula
End Function

And then use IsFormula in the format condition

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.