View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Highlighting rows in a range where ID code does not exist in secon

I'd probably do this with a Conditional Format and put something like this in
the Formula for the VLOOKUP

=ISNA(VLOOKUP(C1, ReferenceRange,1,False))

Change the VLOOKUP to suit. if you want to do this for all of column A for
example, highlight column A and put the first cell that you've selected in
the VLOOKUP. Make sure it looks something like $C1 with no $ before the row.


If you need a VBA example, come back.
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"travis" wrote:

I need to highlight (e.g. by font or background colour) rows which
contain a value that is NOT present in a reference range.

Column S of the reference range contains an account ID code.

In the range being compared, I want to highlight new accounts which do
not exist in the reference range. The new range has a different
layout to the reference range because its a CSV file of payment data
downloaded from an assortment of third party web sites, but lets just
assume for the current example the ID code is in column C.

I know there are a variety of methods I could use including
highlighting all and then looping through the IDs in the reference
range, unhighlighting all rows where the ID appears in the new range.

But is that the fastest way?

What is the most efficient way to code for "if this ID code doesn't
appear in the reference list, highlight the row in bright blue"?

Travis