+ Reply to Thread
Results 1 to 7 of 7

Sort by middle word?

Hybrid View

  1. #1
    Registered User
    Join Date
    12-10-2008
    Location
    Kansas
    MS-Off Ver
    2007
    Posts
    91

    Sort by middle word?

    is it possible to sort or find the lines that have a particular word (in a specific column)?

    for example, I have a column titled part#, I want to find all part # with the word "unit" in them. Unfortunately the word Unit is somewhere in the middle of the text

    thanks!
    Last edited by brotherwo; 03-10-2011 at 05:58 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sort by middle word?

    =isnumber(Search("Unit",A2))

    copied down in a new column where A2 would be first cell to look in.

    TRUE means "Unit" found, then you filter or sort this column.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    12-10-2008
    Location
    Kansas
    MS-Off Ver
    2007
    Posts
    91

    Re: Sort by middle word?

    Quote Originally Posted by NBVC View Post
    =isnumber(Search("Unit",A2))

    copied down in a new column where A2 would be first cell to look in.

    TRUE means "Unit" found, then you filter or sort this column.
    That works however...
    is it possible to return a quantity rather than true false? in column B there is quantity of 2 for a "unit", instead of true can it return 2 and if it was false return zero?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sort by middle word?

    Where is the 2 coming from exactly? What do you mean there is a quantity for "unit"?

    If you simply want a 2 for every cell with Unit and 0 if no unit in the cell..then:

    =2*isnumber(Search("Unit",A2))
    Last edited by NBVC; 03-10-2011 at 04:50 PM.

  5. #5
    Registered User
    Join Date
    12-10-2008
    Location
    Kansas
    MS-Off Ver
    2007
    Posts
    91

    Re: Sort by middle word?

    Quote Originally Posted by NBVC View Post
    Where is the 2 coming from exactly? What do you mean there is a quantity for "unit"?

    If you simply want a 2 for every cell with Unit and 0 if no unit in the cell..then:

    =2*isnumber(Search("Unit",A2))
    I mean there is a column with the quantity of units...so if the statment is true (it is a unit) it will return whatever quantity is in that column. However, if the statement is false I want it to return a zero

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sort by middle word?

    You mean something like:


    =IF(isnumber(Search("Unit",A2)),B2,0)

    where B2 contains the quantity?

  7. #7
    Registered User
    Join Date
    12-10-2008
    Location
    Kansas
    MS-Off Ver
    2007
    Posts
    91

    Re: Sort by middle word?

    awesome...works great!
    Thanks

+ 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