Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keep row if cell value exist in another column

Tags:

excel

If I have the following 3 column layout in Excel...

column1  column2    column3
one      three      info about three

two      one        info about one

three    two        info about two

four     six        info about six

         seven      info about seven

         eight      info about eight

...how do I delete or hide or remove any row that doesn't have a column 1 value in column 2?

My end results should look like this...

column1  column2    column3
one      

two      one        info about one

three    two        info about two

four     
like image 705
klewis Avatar asked Mar 20 '23 05:03

klewis


1 Answers

  1. Insert a new column to the right of 'column 2'
  2. Add a heading of "Lookup" to this new column
  3. Insert this formula in row 2 of this new column: =if(countif(A:A,B2) > 0,"true","false")
  4. Fill that formula down through all remaining rows
  5. Select all and activate the data filter
  6. Filter the "Lookup" column by 'true'

(Note: you may have to copy and 'paste > values only' on the "Lookup" column to have excel truly recognize the lookup results)

like image 124
Astockwell Avatar answered Mar 29 '23 02:03

Astockwell