+ Reply to Thread
Results 1 to 4 of 4

sorting a row of strings

  1. #1
    Registered User
    Join Date
    09-24-2009
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    sorting a row of strings

    Hey guys,
    ------
    I need help in programming a simple row search within a list that searches for key strings within a current row, and if found, place that cell and its adjacent cell in sorted columns

    below is some pseudo code for how i think the program should look like but see the example worksheet for how it should eventually look like on a spreadsheet.
    ------
    Please Login or Register  to view this content.
    Few notes:

    - Each key string cell will always have a corresponding data cell adjacent to it
    - Each key string cell will only appear at most once per row
    - The key strings are usually out of order
    - Rows will need to be preserved
    - Each row will have at least one key string
    - Sorting the rows can be done within the same worksheet, or a new worksheet, but again, the rows need not be changed.

    Thanks in advance!
    Attached Files Attached Files
    Last edited by wlan11g; 12-26-2009 at 12:53 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: sorting a row of strings

    Put your initial data set onto a sheet without all that stuff around it, so the first column of data starts at A1. Then try this macro:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-24-2009
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    [SOLVED] Re: sorting a row of strings

    Thanks JBeaucaire,

    all working sweetly.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: sorting a row of strings

    Glad to help...

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated. It is found across from the "time" in each of our posts.)

+ 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