+ Reply to Thread
Results 1 to 8 of 8

Number count and sort macro

  1. #1
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Number count and sort macro

    In column A and column C for the first 10 rows only I have data in a cell followed by a number (possibly two numbers sometimes separated by a comma) in the same cell. I want a macro to tell me the lowest number that it finds and the word it was found beside. I have attached a sample workbook showing a before and after.

    samplesheet.xlsm

  2. #2
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Number count and sort macro

    Any ideas? Perhaps something with Text to Columns might help but I still haven't found a good way yet.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Number count and sort macro

    Try this
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Number count and sort macro

    Thanks Jindon. Works perfect if there is only one word. However at times the cell will be "Test Test 12" or a different number or perhaps "Test Test Test 12". Is there a way to deal with those possible differences in the macro? Thanks!

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Number count and sort macro

    Need to see variety of data and the desired result from there.

  6. #6
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Number count and sort macro

    Here you go.

    Thanks again!

    samplesheetNEW.xlsm

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Number count and sort macro

    OK
    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Number count and sort macro

    Awesome! Thankks!

+ 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