+ Reply to Thread
Results 1 to 10 of 10

Searching columns for words and then returning row-word combinations

  1. #1
    Registered User
    Join Date
    02-17-2014
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    10

    Searching columns for words and then returning row-word combinations

    I have a spreadsheet in which the rows are unique individuals with an ID number in column A. There are 79 columns and each may contain one or more drugs that I am searching for (e.g. "morphine" and "baclofen"). I would like to search the spreadsheet for defined words and then express the output as individual ID - drug pairs so that I can see which dugs appear in which individuals rows. I am using excel 2010.
    Thanks
    JB
    Last edited by JonBrett; 03-10-2014 at 04:28 AM.

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Searching columns for words and then returning row-word combinations

    Hello Jon can you please upload a sample work book with atleast 10-15 rows of data and results expected to work with
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Searching columns for words and then returning row-word combinations

    Something like this .
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-17-2014
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Searching columns for words and then returning row-word combinations

    Hi thanks for that. I've attached an example of the data - its been scrambled and anonymized.
    Thanks!
    JOn
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Searching columns for words and then returning row-word combinations

    What are the unique IDS and what results you are seeking can you give 2-3 examples

  6. #6
    Registered User
    Join Date
    02-17-2014
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Searching columns for words and then returning row-word combinations

    Thanks! Column 1 which is the NCIS number is the unique ID. I have reattached the example with another worksheet called person-drug pairs with some examples.
    cheers!
    Jon
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Searching columns for words and then returning row-word combinations

    Hello Jon
    in Person-Drug Pairs in cell A1
    copy paste below then hold control and shift and then hit enter to make it array formula and release all three keys and drag down

    =INDEX('Main data sheet'!$A$1:$A$23,MIN(IF(ISNUMBER(SEARCH(B1,'Main data sheet'!AP2:BZ23)),ROW(AP2:BZ23))))

    Hope this helps
    Attached Files Attached Files
    Last edited by hemesh; 03-10-2014 at 07:25 AM.

  8. #8
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Searching columns for words and then returning row-word combinations


  9. #9
    Registered User
    Join Date
    02-17-2014
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Searching columns for words and then returning row-word combinations

    Thanks Hamesh!

  10. #10
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Searching columns for words and then returning row-word combinations

    mark thread as solved if this satisfies your query

+ 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. Replies: 12
    Last Post: 02-01-2013, 03:05 PM
  2. Replies: 1
    Last Post: 01-30-2013, 04:41 AM
  3. Replies: 6
    Last Post: 03-02-2012, 02:47 AM
  4. Searching Columns and Returning Row values
    By jasteinh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-31-2010, 09:09 AM
  5. [SOLVED] summing and searching with words and numbers in different columns
    By juskojj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-13-2010, 09:55 AM

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