+ Reply to Thread
Results 1 to 17 of 17

need help sorting by partial text in a cell - I think! :)

  1. #1
    Registered User
    Join Date
    10-10-2013
    Location
    York, pa
    MS-Off Ver
    2007
    Posts
    7

    need help sorting by partial text in a cell - I think! :)

    How do I sort within a cell? For instance………… I have one-column table (all values in each row below are in *one* single cell).
    MLDG,TOP,SIDE,PNE,384 OLD 839
    EAR,POP,BLNK,106,27
    EAR,POP,BLNK,106,27
    EAR,POP,BLNK,106,27
    EAR,POP,BLNK,106,27
    EAR,POP,BLNK,106,27
    CAP,FLAT,POP,BLNK,121
    MLDG,TOP,SIDE,POP,120
    EAR,OAK,BLNK,256,20.5
    EAR,OAK,BLNK,256,20.5
    EAR,OAK,BLNK,256,20.5
    CAP,FLAT,PNE,BLNK,351 6/6-22
    CAP,FLAT,PNE,BLNK,351 6/6-22

    I want to sort by species of *wood* which in this case is Oak, Pine, Poplar (OAK,PNE,POP)….etc. If you look at the top line, it starts with MLDG,TOP,SIDE,PNE,384……… How do I pick out the PNE for pine and move it to the front of the cell so I can sort by wood species (in this case PNE)? Same with the other cells below, POP or OAK….

    I’m trying to sort on species so I know which is causing us the most headaches regarding defects we are seeing in my shop. Any help would be appreciated!
    Barbie

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: need help sorting by partial text in a cell - I think! :)

    Hi

    this is easy.

    Two routes are open to you

    Formulas or macros. I personally would use a macro.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: need help sorting by partial text in a cell - I think! :)

    are your numbers relevant?

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: need help sorting by partial text in a cell - I think! :)

    How many rows of data do you have and is it likely to change?

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: need help sorting by partial text in a cell - I think! :)

    Ok I have scoped this out and have a solution for you.


    BRB

  6. #6
    Registered User
    Join Date
    10-10-2013
    Location
    York, pa
    MS-Off Ver
    2007
    Posts
    7

    Re: need help sorting by partial text in a cell - I think! :)

    Numbers are relevant, and number of rows will vary. I have not done much with macros, but am very willing.

    Forgive me for asking... is there money involved in getting an answer? (If so, my apologies for not being more aware - I just searched for a forum about "Excel Help"). I am wondering why a few of you have answers for me, but they are not showing up.... that is my best guess

    Regards,
    Barbie

  7. #7
    Registered User
    Join Date
    10-10-2013
    Location
    York, pa
    MS-Off Ver
    2007
    Posts
    7

    Re: need help sorting by partial text in a cell - I think! :)

    Oh, duh, I am so dense. All of the answers were from one person. My apologies - I hope I don't step on toes!!!!
    Barbie

  8. #8
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: need help sorting by partial text in a cell - I think! :)

    LOL

    This is for free

    i will have a solution for you in twenty minutes.

    BRB

  9. #9
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: need help sorting by partial text in a cell - I think! :)

    I had a second look at your data.

    There is only one wood type per line is that so?

    Please list all the wood types that you use at the moment

  10. #10
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: need help sorting by partial text in a cell - I think! :)

    This does the text editing that you wanted.

    i will do the sorting next.
    Attached Files Attached Files
    Last edited by mehmetcik; 10-10-2013 at 03:39 PM.

  11. #11
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: need help sorting by partial text in a cell - I think! :)

    Ok

    I am happy with this.

    I have built in three macros for you.

    The first is operated by the button on the Database sheet and loops through each type of wood in column A of the worksheet woods.
    it looks for the code and puts that at the start of the text.

    It then sorts the Database Alphabetically.

    The second macro runs whenever you deactivate the woods sheet and creates a drop box in cell A1 of the database listing all the wood types.

    The third macro runs whenever you change the drop box and moves your selected wood type to the top of the database.

    Enjoy.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    10-10-2013
    Location
    York, pa
    MS-Off Ver
    2007
    Posts
    7

    Re: need help sorting by partial text in a cell - I think! :)

    Oh, thank you SO much! Especially after I insulted you (I didn't mean to!).

    I have a migraine, so am off to early bed, but I will play with this first thing in the morning - I am excited!
    Barbie

  13. #13
    Registered User
    Join Date
    10-10-2013
    Location
    York, pa
    MS-Off Ver
    2007
    Posts
    7

    Re: need help sorting by partial text in a cell - I think! :)

    Here are the wood species, there are nine:



    ​​
    Poplar
    ​ POP​

    Oak
    ​ OAK​

    Maple
    ​ MAP​

    Walnut
    ​ WAL​

    Cherry
    ​ CHR​

    Mahogany
    ​ MHG​

    Ash
    ​ ASH​

    Pine
    ​ PNE

    Pecan
    ​ PEC​

  14. #14
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: need help sorting by partial text in a cell - I think! :)

    I have updated the list of different woods on the sheet "Woods".

    Its easy to do. Just add new woods to the list. The Macro will find them.
    Attached Files Attached Files

  15. #15
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: need help sorting by partial text in a cell - I think! :)

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  16. #16
    Registered User
    Join Date
    10-10-2013
    Location
    York, pa
    MS-Off Ver
    2007
    Posts
    7

    Re: need help sorting by partial text in a cell - I think! :)

    Oh, I am sorry for cross-posting. I was so hurried for an answer I did not read the terms for the forum (my apologies).

  17. #17
    Registered User
    Join Date
    10-10-2013
    Location
    York, pa
    MS-Off Ver
    2007
    Posts
    7

    Re: need help sorting by partial text in a cell - I think! :)

    Thank you! I am playing with the macro right now! My sincerest thanks for your help. I will pay it forward (but not with Excel... LOL).
    Barbie

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] remove partial text from cell
    By D Casten in forum Excel General
    Replies: 6
    Last Post: 07-13-2014, 11:11 PM
  2. Excel 2007 : Partial text of reference cell
    By donkeylarry in forum Excel General
    Replies: 3
    Last Post: 02-07-2012, 06:48 PM
  3. How do I count partial text in a cell
    By Pat Parker in forum Excel General
    Replies: 2
    Last Post: 06-04-2010, 11:12 PM
  4. matching partial text within one cell to partial text within another
    By Solstice in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 03-03-2010, 09:13 PM
  5. Pulling Partial Text from a cell
    By U6C84 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-17-2007, 01:54 PM

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