ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   rename same entries (https://www.excelbanter.com/excel-programming/324116-rename-same-entries.html)

Rainer Welzel

rename same entries
 
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




Tom Ogilvy

rename same entries
 
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.

--
Regards,
Tom Ogilvy



"Rainer Welzel" wrote in message
...
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






Dave Peterson[_5_]

rename same entries
 
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)

Rainer Welzel wrote:

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


--

Dave Peterson

Rainer Welzel

rename same entries
 
thanks for the answers, but I search for a macro solution,
so I mark the whole column an start the macro.

rainer



Tom Ogilvy

rename same entries
 
The easiest macro solution would implement the formulas described.

--
Regards,
Tom Ogilvy

"Rainer Welzel" wrote in message
...
thanks for the answers, but I search for a macro solution,
so I mark the whole column an start the macro.

rainer






All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com