+ Reply to Thread
Results 1 to 7 of 7

Compare format of items and put same item in the same row

  1. #1
    Forum Contributor
    Join Date
    10-06-2012
    Location
    Basel, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    157

    Compare format of items and put same item in the same row

    Hi All,
    I am looking for a macro that can help compare items in one column based on a rule, and if the item is the same, put it in the same row. See attachment
    Thanks for your help

    Nic
    Attached Images Attached Images
    Last edited by Niclal; 01-23-2013 at 09:46 AM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: Compare format of items and put same item in the same row

    Which columns are you comparing and what is the rule? Could you post a copy of your file instead of a picture? This would make it easier to help.

  3. #3
    Forum Contributor
    Join Date
    10-06-2012
    Location
    Basel, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Compare format of items and put same item in the same row

    Hi There,
    I am comparing items in only one column, and the rule is like if you have the item a01c0001/01 is the same as a01c1/01, or item a01c0054/43 is the same as a01c54/43. You can see that the zeros make the difference. Please check the file attached. Column A contains the items to be compared, Column B and Column C the results. It is a kind of reorganizing the data in Column A. At the end, the number of items of Column A should be the same as the sum of items of Column B+Column C.

    Thank you
    Attached Files Attached Files

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Compare format of items and put same item in the same row

    Hi Nic,
    try it
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    10-06-2012
    Location
    Basel, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Compare format of items and put same item in the same row

    Hi Nilem,
    Thank you so much. I would be grateful, if you could explain the different steps a bit, since I am a newbie in Macros and would like to learn and understand.
    Very much appreciated!
    Niclal

  6. #6
    Forum Contributor
    Join Date
    10-06-2012
    Location
    Basel, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Compare format of items and put same item in the same row

    Hi Nilem,
    I am coming back to you because you were of great help with this macro.
    Considering only the data in column A (see Book1.xlsx), how could I change the macro to make all entries of column A having the format e.g. A01B0001/16.
    The results would be
    A01B0001/16
    A01B0039/00
    A01B0069/00
    A01B0073/00
    A01B0073/02
    A01B0079/56
    A01B0001/16
    A01B0073/00
    A01B0079/56

    Much appreciated!

    Nic

  7. #7
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Compare format of items and put same item in the same row

    Hi Nic,
    maybe so
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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