Search code examples
excelexcel-formulavlookup

How to pull out cells out of a table to create a new table?


How can I pull out cells (Names) and their corresponding cells (Ages) out of a table to create a new one?

I have the column of names and ages below:

enter image description here

I'd like to pull out the following:

enter image description here

So that my final column will be as it is below in Names_final and Ages_final

enter image description here


Solution

  • Using FILTER and COUNTIFS:

    =FILTER(A2:B9,COUNTIFS(D2:D4,A2:A9)=0)
    

    enter image description here