View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
bshorey bshorey is offline
external usenet poster
 
Posts: 3
Default locating duplicates

Thanks, Dave.

I wasn't totally clear on your instructions, so I tried using the sumproduct
in conditional formatting and everything shaded yellow. Instead, I tried
pasting the sumproduct in a helper column (F). It returned numbers that
indicated how many times that particular invoice number occurred in the
spreadsheet (i.e. 2, 5, 16). So essentially it worked.

But it also involved copying and pasting special values into another helper
column (G) to get rid of the formulas, then deleting the original helper
column (F), then doing a bunch of sorts to see what kind of results I had
gotten.

I would prefer color shading to the number return, so if anyone has any
other solutions, I'd like to know!

"Dave Peterson" wrote:

=countif() does text comparisons.

So '1 and 1 will be counted.

You could use =sumproduct()

=sumproduct(--($e$1:$E$99=e1))

to distinguish between text and numbers.

But if your values are really numbers just with different numberformats, you'll
have to do something different.

About the =sumproduct() formula:

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

--

Dave Peterson