Highlighting Duplicate Entries

A

Aaron

Hi,
I have 2 columns, one with part numbers and one with their associated
prices. Since occasionally a part number will be listed twice with
different prices (a mistake), I need to eliminate one of these for each
duplicate.
I've tried to use the Format->Conditional Formatting technique as
described at http://www.cpearson.com/excel/duplicat.htm under the
"Highlighting Duplicate Entries" section, but it highlights nothing.
Since my part numbers are in column A, I wrote the formula as:

=IF(COUNTIF(Range1, A2)>1,TRUE,FALSE)

Is there something I'm doing wrong here?

Thanks,
Aaron
 
D

Dave Peterson

Range1 represents either a range name or an address:

=IF(COUNTIF(a:a, A2)>1,TRUE,FALSE)

should work ok.
 
M

Martyn

Dave,
I've tried the formula on one of my lists on column A (with
Name+Space+Surname info) on an XL sheet. Some names were highlighted but are
not duplicates!. Can you please comment on that?
Sincerely
Martyn
 
D

Dave Peterson

I'm guessing that your formula didn't refer to the active cell.

If you've selected A2:A9999, and A2 is active, then it should work ok.

But if you've selected A7:a9999 and wrote your formula to look at A2, then
you'll be comparing the cell 5 rows above.
 
M

Martyn

Thanks Dave,
correcting the formula from referring (A:A) to (A2:A1000) correted the
results...
Much appreciated

Dave Peterson said:
I'm guessing that your formula didn't refer to the active cell.

If you've selected A2:A9999, and A2 is active, then it should work ok.

But if you've selected A7:a9999 and wrote your formula to look at A2, then
you'll be comparing the cell 5 rows above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top