+ Reply to Thread
Results 1 to 11 of 11

How to mark multiple entries in the same column with numbers?

  1. #1
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472

    How to mark multiple entries in the same column with numbers?

    Hello,

    I have many wordlists, which have multiple entries in one column. I would like to mark up entires which appear more then once with numbers 1,2,3....The number should be put at the end of the word or ath the beginning.

    Before Macro:

    Column A

    Love
    Love
    Long
    Lonely
    Lonely
    Living
    Living


    After running the macro:

    Column A

    Love 1
    Love 2
    Long
    Lonely 1
    Lonely 2
    Living 1
    Living 2

    Thank you very much

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    In B1 and copy down,

    =countif(a$1:a1, a1)

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Adding to shg's suggestion, using this formula will show the cell as you are intending, but in column B:

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

    HTH

    Jason

  4. #4
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472
    First of all thank you very much for your answer.

    I dont know what i am doing wrong. But every time i paste the function in column B it shows me an error. I am sending a smal excell file and i will very appriciate if you could please edit that file and write the funktion in Coloumn B and upload it for me as soon as it functions. Thank you very much in andvance.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    First, just copy and paste either of the above two formulas supplied above into cell B1. Then, copy the cell, and paste down through B16.

    HTH

    Jason

  6. #6
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472
    hi,
    thanks for the answer. I did the way you asked me to. But an error message comes that the given formula cosist of error.

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

    It seems having problem with the red area! Is it possible to upload an example excel file here, where you have given the formula and it funktions?

  7. #7
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Quote Originally Posted by wali
    Is it possible to upload an example excel file here, where you have given the formula and it funktions?
    Yes, you need to ZIP it first, and then post the ZIP file.

    Jason

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by wali
    hi,
    thanks for the answer. I did the way you asked me to. But an error message comes that the given formula cosist of error.

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

    It seems having problem with the red area! Is it possible to upload an example excel file here, where you have given the formula and it funktions?
    It could be that your version of Excel requires semi-colons as separators instead of commas?

    e.g. =A1&IF(COUNTIF(A:A;A1)>1;" "&COUNTIF(A$1:A1;A1);"")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  9. #9
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472
    not working yet!! :-(
    But thank you very much any way.

    i am sorry but its still not working. I dont know, whats wrong. I tried it in excel2003 and in 2007. In both cases i get the error for both ; and , in both excel versions. My excel is in german but i cant imagin that thats the reason for the error.

    I am uploading a test file. I will really appriciate, if some one could find the time to add the formula in it and upload it again.

    Thanks
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    You weren't trying to enter the formula in column A, were you? That formula was meant for column B (see attached).

    Jason
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472

    Now it works!!

    Thank you very much. Now it works the way it should. It really was the excel language version problem. Now as i opened your excel file the formula was automaticaly translated into german and it looks now like:

    =A1&WENN(ZÄHLENWENN(A:A;A1)>1;" "&ZÄHLENWENN(A$1:A1;A1);"")

    Thank you very much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1