rename same entries

  • Thread starter Thread starter Rainer Welzel
  • Start date Start date
R

Rainer Welzel

I have a column with names. The names have to be unambiguous .
So e.g. if Miller exists 3 times , I will rename to
Miller
Miller1
Miller2

thx for help

rainer
 
Assume the names are in column A starting in cell A2

in B2 (for example) put in a formula

=A2&IF(COUNTIF($A$1:A1,A2)>0,COUNTIF($A$1:A1,A2),"")

then drag fill down the column

you can then select the column and do Edit=>Column, then Edit=>Paste Special
and select values to replace the formulas with the values they display. You
can then replace the existing data if you wish.
 
I'd use an extra column and use a formula like:

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

(assuming your data is in A1:Axxx)

If you could live with
Miller1
Miller2
Miller3

as output, the formula would have less to do:
=A1&COUNTIF($A$1:A1,A1)
 
thanks for the answers, but I search for a macro solution,
so I mark the whole column an start the macro.

rainer
 
The easiest macro solution would implement the formulas described.
 

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

Back
Top