+ Reply to Thread
Results 1 to 8 of 8

Grouping similar numbers in a row

  1. #1
    Registered User
    Join Date
    06-27-2012
    Location
    Cape Town
    MS-Off Ver
    Excel 2003
    Posts
    39

    Grouping similar numbers in a row

    I have 1500 product image names consisting of 7 digits each in one Excel column. The first numbers of each code indicates the product and the last 2 only the colour.

    Some of the codes have corresponding numbers (first 5) in 2 or more lines. I would like to know if there is a formula that will recognize the corresponding first 5 numbers for a number of rows and then be able to place all these corresponding numbers' full file name in one row?

    For Example:

    This is the list of product image names I have.

    1107000.jpg
    1107004.jpg
    1107005.jpg
    1108500.jpg
    1108503.jpg
    1108504.jpg
    1108505.jpg
    1108509.jpg
    1108510.jpg
    1108511.jpg

    Once the formula is applied by recognizing the first five corresponding numbers it should be place in one line as follows:

    1107000.jpg1107004.jpg1107005.jpg
    1108500.jpg1108503.jpg1108504.jpg1108505.jpg1108509.jpg1108510.jpg1108511.jpg

    At this stage I do this exercise manually which takes up a lot of time.

    I would really appreciate some help!

  2. #2
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: Grouping similar numbers in a row

    Try the attached.
    Attached Files Attached Files
    Kind Regards,

    Out of the Hat

    "Computers are stupid - they do EXACTLY what you tell them to"

    If I've helped you with a problem, please say thanks by clicking the small star icon on the left.

  3. #3
    Registered User
    Join Date
    06-27-2012
    Location
    Cape Town
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: Grouping similar numbers in a row

    Brilliant!

    It does the job! Just one question.

    In the formatted sheet, if you want the file names all in one row in a column instead of over various columns. Is that possible?

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Grouping similar numbers in a row

    Hi Fugly and welcome to the forum,

    Find attached on sheet3 another way to accomplish your task. It uses a few helper columns and a pivot table to determine the max number of the helpers. See if works for you.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Registered User
    Join Date
    06-27-2012
    Location
    Cape Town
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: Grouping similar numbers in a row

    Hi!

    Works like a bomb, thanks!

    Last question, I hope!

    Now that the file names are all in one line what can I do to now choose the product lines with the most images in as the default line and carry that row over to a spreadsheet instead of once again doing it manually?

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Grouping similar numbers in a row

    The answer is in Column I. They are the maximum for each. I don't know what automation you now want.

  7. #7
    Registered User
    Join Date
    06-27-2012
    Location
    Cape Town
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: Grouping similar numbers in a row

    Hi Marvin,

    It looks like this is the solution I am looking for.

    But how do I expand the Helper table to include all the product codes and to give the corresponding max number of helpers?

  8. #8
    Registered User
    Join Date
    06-27-2012
    Location
    Cape Town
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: Grouping similar numbers in a row

    I posted a similar problem previously but this one has a twist.

    I have 3 500 product image names consisting of anything from 5 to 9 digits each in one Excel column. The product codes contain both letters and numbers

    I would like to know if there is a formula that will recognize the corresponding first numbers for a number of rows and then be able to place all these corresponding numbers' full file name in one row?

    For Example:

    This is the list of product image names I have.

    BB07000.jpg
    BB07004.jpg
    BB07005.jpg
    CC08500.jpg
    CC08503.jpg
    CC08504.jpg
    CC08505.jpg
    CC08509.jpg
    CC08510.jpg
    CC08511.jpg

    Once the formula is applied by recognizing the first five corresponding numbers it should be place in one line as follows:

    BB07000.jpgBB07004.jpgBB07005.jpg
    CC08500.jpgCC08503.jpgCC08504.jpgCC08505.jpgCC08509.jpgCC08510.jpgCC08511.jpg

    At this stage I do this exercise manually which takes up a lot of time.

    I am attaching a sample of the numbers which need to be grouped.

    I would really appreciate some help!
    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