View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default duplicate occurance, assigning an ordinal value

Thanks for the response. What I'm looking for more than a flag, but
rather an assignment of a unique value of where that duplicate occurs
within the series of duplicates. So for example, if Model1234 appears
8 times, the first time would assign the value "1", the second "2",
etc. I found a post corresponding to this, "Nth position of occurence
in a list", and am working with the formula,
=small(if(range=C2,row(range),N)-cell("row",range)+1


Does this do what you are after? Assume your list is in Column A starting at
A1 and the name you want to find the duplicates of is placed in C1... then
place the following formula in B1 and copy down as needed.

=IF(A1=$C$1,COUNTIF(A$1:A1,"="&$C$1),"")

Rick