View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Brad Brad is offline
external usenet poster
 
Posts: 846
Default Conditional Formating - formula not working

My suggestion would have been the same as Jim's

=if(ISNA(vlookup(A1, A2:B10, 2, False)), "Not Found", vlookup(A1, A2:B10, 2,
False))
--

With one small adjustment
=if(ISNA(vlookup(A1, $A$2:$B$10, 2, False)), "Not Found", vlookup(A1,
$A$2:$B$10, 2,
False))

That way if you need to copy the equation - your lookup range remains the
same.

Why Excel handled the #NA differently - can't give you a 100% definitive
answer.


"EagleOne" wrote:

Brad,

The issue appears to be related to the displayed results of an
unsuccessful VLookup. Meaning, if I type in #N/A, the CF formula works
but if the displayed #N/A is from the VLookup, it is not considered
"not equal" and the formula fails.

How do I work around this?

EagleOne

Brad wrote:
Using your logic I got the red to work - however I had to remove the double
quotes the conditional formating added when I typed in the equation

"EagleOne" wrote:

2003

Cell A1 = 101
Cell B1 = 101
Cell C1 = #N/A (Unsuccessful VLookup)

What I want (CF background color of A1 = Red) if EITHER B1 or C1 does
not equal A1

The actual not-working formula in A1 Conditional Format is:
Formula is =OR(A1<B1,A1<C1) Then Set Background Color to Red

Thanks EagleOne