1. Let's imagine I have a sheet with over 5000 rows (let's say columns "A" through "H") on it.
2. I have a "to-remove-list" in sheet number two, which is a single column named "A," with 400 values in it, each of which has an alphanumeric string (example: xxx1234).
3. If any value from the "to-remove-list" (from column "A" of sheet number two) is present in column "E," then I must remove every single row from sheet number one as a whole.
4. By deleting the row and moving it up, I mean to remove the entire row (not leaving the blank space)

How can I accomplish that?

Nov 6, 2022 in Others 1,263 views

## 1 answer to this question.

Given sheet 2:

```ColumnA
-------
apple
orange
```

You can flag the rows in sheet 1 where a value exists in sheet 2:

```ColumnA  ColumnB
-------  --------------
pear     =IF(ISERROR(VLOOKUP(A1,Sheet2!A:A,1,FALSE)),"Keep","Delete")
apple    =IF(ISERROR(VLOOKUP(A2,Sheet2!A:A,1,FALSE)),"Keep","Delete")
cherry   =IF(ISERROR(VLOOKUP(A3,Sheet2!A:A,1,FALSE)),"Keep","Delete")
orange   =IF(ISERROR(VLOOKUP(A4,Sheet2!A:A,1,FALSE)),"Keep","Delete")
plum     =IF(ISERROR(VLOOKUP(A5,Sheet2!A:A,1,FALSE)),"Keep","Delete")
```

The resulting data looks like this:

```ColumnA  ColumnB
-------  --------------
pear     Keep
apple    Delete
cherry   Keep
orange   Delete
plum     Keep```
• 63,700 points

## How to trick an Excel function that wants a column as input to accept a list of values as if these were in a column

Use VSTACK: vstack to make an array: Use it as value ...READ MORE

## datatable remove column on export to pdf and excel

When we are using jquery datatable for ...READ MORE

## 1-step shortcut to delete entire row in excel 2016

Highlight the whole row by clicking on ...READ MORE

## Simple way to remove blank cells dynamic dropdown list Excel

Every time I create a dependent dynamic ...READ MORE

## Excel formula for searching two text in one cell and return values based on the result

You can include a second IF within ...READ MORE

## Updating Powerpoint - Excel Link in Different Computer

You could look at the Excel shape's ...READ MORE

## Using c# to select a worksheet in excel

Try this: Excel.Worksheet xlWorkSheetFocus = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(2); xlWorkSheetFocus.Activate(); I hope this ...READ MORE