Forum Discussion

migoblu's avatar
migoblu
Copper Contributor
May 20, 2021

How to find and extract

How would I find a name in a database and copy the entire multiple rows that name appears in?

5 Replies

  • Yea_So's avatar
    Yea_So
    Bronze Contributor

    Hi migoblu 

     

    You import the csv file into excel:

    Click Data > From file > From text/Csv

    A dialog box pops up to browse for the csv file,

    find it and select it then press Import

    another dialog box pops up

    Click Transform Data then this will pop up

    click Close & Load then you will see the csv file got imported into excel it will look like this. click the x in Queries & Connections to close that navigation panel

    In a new sheet, type the name you're looking for example 250190

    then in a couple of cells below it enter a formula like this:

    =FILTER(Book2[#All],ISNUMBER(SEARCH($A$1,Book2[[#All],[Part '#]],1)))

    the search formula is basically saying search $A$1 (which is the name that you're looking for that you typed on cell A1, then selecting the entire column called Part # of the csv that was imported example: Search($A$1, Column range where the name is) then put that formula into an

    ISNUMBER(Put the search formula in here)

    then create the formula

    FILTER(Select the whole range that was imported, then the other two fromulas in here)

    so

    formula #1 SEARCH($A$1,Book2[[#All],[Part '#]],1)

    formula #2 ISNUMBER(Put formula #1 in here)

    formula #3 FILTER(Select entire range of the imported csv, Formula #1&2 nested here)))

    and the result will show:

     

    Hope that helps.

    • migoblu's avatar
      migoblu
      Copper Contributor
      It is a (csv) spreadsheet, that has list of names, amounts of DNA, and common ancestors. I need to extract specific names that are in multiple rows to place them in a new spreadsheet, to analyze the data. I am using that find function and it takes hours to extract one name to the new spreadsheet.
      • JKPieterse's avatar
        JKPieterse
        Silver Contributor
        Have a look at the "From Text/CSV" button on the Data tab of the ribbon. It might help you filter more quickly.

Resources