+ Reply to Thread
Results 1 to 14 of 14

if any number are repeating

  1. #1
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Post if any number are repeating

    my document column "M" ,this type of numbers are there.

    column "M"

    125468A-B
    125468A-B
    458962
    256897
    412589A-C
    412589A-C
    412589A-C

    01.i need to remove A-B,A-C part.
    02.after that any number are repeating that all the number's end part should add (A,B,C,,,,)it's like this.....
    [B]
    column "M"

    125468A
    125468B
    458962
    256897
    412589A
    412589B
    412589C

    pls make macro for me.......
    Last edited by johncena; 02-14-2010 at 07:47 AM.

  2. #2
    Registered User
    Join Date
    02-13-2010
    Location
    Chernivtsy, Ukraine
    MS-Off Ver
    Excel 2002, Excel 2003
    Posts
    6

    Re: if any number are repeating

    sorry, i made a mistake
    Last edited by Vitaly K.; 02-14-2010 at 05:37 AM.

  3. #3
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: if any number are repeating

    its ruff
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  4. #4
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Re: if any number are repeating

    thanks a lot friend.i will try....
    Last edited by DonkeyOte; 02-14-2010 at 08:01 AM. Reason: unnec. quote removed

  5. #5
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Smile Re: if any number are repeating

    wow.it's 500% work.thanks a lot.u done a great help for me.thanks again....
    Last edited by DonkeyOte; 02-14-2010 at 08:01 AM. Reason: unnec. quote removed

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: if any number are repeating

    non macro method assuming there are no more than 26 of any number as you never said what that shoud be.
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Re: if any number are repeating

    Quote Originally Posted by martindwilson View Post
    non macro method assuming there are no more than 26 of any number as you never said what that shoud be.
    thanks friend....

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: if any number are repeating

    Hi johncena
    You may want to add some more letters to the choose to cover A-G
    Please Login or Register  to view this content.

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: if any number are repeating

    johncena,

    please avoid quoting posts in their entirety - this simply clutters up the thread.

    to reply either use New Post button - if you wish to Quote please quote only those parts necessary to sustain a logical flow to the thread.

  10. #10
    Registered User
    Join Date
    02-13-2010
    Location
    Chernivtsy, Ukraine
    MS-Off Ver
    Excel 2002, Excel 2003
    Posts
    6

    Re: if any number are repeating

    Quote Originally Posted by martindwilson View Post
    non macro method assuming there are no more than 26 of any number as you never said what that shoud be.
    one little addition to your great solution: we can take the same result with only 1 column

    it also works as it should, as far as I can see
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Re: if any number are repeating

    thanks a lot friends.u all done great help for me......

  12. #12
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: if any number are repeating

    This is solved but I'm just adding this to demo how to circumvent the 26 constraint in a single cell approach (based on prior post attachment):

    Please Login or Register  to view this content.

    however the above makes an assumption that the chars to be stripped pre hyphen are a single alpha only.

    I would say a VBA based solution is more practical here - but that's JMHO.

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: if any number are repeating

    id just add another helper col or two and do it with functions LOL and its always handy if you keep for occasions like this this text file
    Attached Files Attached Files
    Last edited by martindwilson; 02-14-2010 at 09:50 AM.

  14. #14
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: if any number are repeating

    Hi johncena
    For the best spreadsheet performance ,if you can, its always best to use the excel function first and vba second

+ 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