Hi, I'm just trying to do something pretty straight forward. All I need to do is a) run a test to see if data within one sheet exists in another sheet ((vlookup or xlookup function perhaps?), then delete the row of that other sheet. Here is example below:
Sheet I want to delete rows from:
Sheet I'm testing from:
And proper end results I should have after running script:
Any help would be greatly appreciated!
Sheet I want to delete rows from:
If-Data-Exists-in-range-in-worksheet-a-then-delete-corresponding-row-in-worksheet-b.xlsx | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | |||
1 | Category A | Category B | Category C | Category D | Category E | Category F | Category G | Category H | Category I | Category J | FirstName | LastName | Personal | Close Personal | What | Company | |||
2 | x | x | x | x | x | x | Albert | Hammond | x | x | Guitarist | Roland | ahammond@gmail.com | ||||||
3 | x | x | x | x | x | x | Albert | Hammond | x | x | Guitarist | Roland | fenderbender@gmail.com | ||||||
4 | x | x | x | x | Cynthia | Jones | Painter | Warhol Inc. | info@warhol.com | ||||||||||
5 | x | x | x | x | Cynthia | Jones | Painter | Warhol Inc. | cynthia@warhol.inc | ||||||||||
6 | x | x | x | x | Cynthia | Jones | Painter | Warhol Inc. | cjones@gmail.com | ||||||||||
7 | x | Derrick | Lewis | Carpenter | All Done Right Inc. | derrick_lewis@alldoneright.org | |||||||||||||
8 | x | Edward | Alby | x | Lighting Designer | Brighter Days | albyed@brigherdays.com | ||||||||||||
9 | x | Edward | Alby | x | Lighting Designer | Brighter Days | e.alby@gmail.com | ||||||||||||
10 | x | Edward | Alby | x | Lighting Designer | Brighter Days | e.alby@mac.com | ||||||||||||
11 | x | x | x | x | Jeff | Cousins | x | x | Dancer | Breakin Up Inc. | jeffcousins@gmail.com | ||||||||
12 | x | x | Marcus | Kaufman | x | Singer | Lauren Nicole | marcusk@ln.com | |||||||||||
13 | x | Lauren | Betts | Drummer | First Instruments | laurenbetts@hotmail.com | |||||||||||||
14 | x | x | x | x | Pauline | Huerta | x | Acrobat | Mission Inc. | aria101@aol.com | |||||||||
15 | x | x | x | x | x | x | x | Richard | Grove | x | Broadcaster | ABC | c.martini@missoni.it | ||||||
16 | x | x | x | x | x | x | x | Richard | Grove | x | Broadcaster | ABC | richard.grove@abc.com | ||||||
17 | x | x | x | x | x | x | x | Richard | Grove | x | Broadcaster | ABC | rgrove@gmail.com | ||||||
18 | x | x | x | x | x | x | x | Richard | Grove | x | Broadcaster | ABC | grove131@hotmail.com | ||||||
19 | x | x | x | x | x | x | x | Richard | Grove | x | Broadcaster | ABC | rgrove@grove.com | ||||||
Before |
Sheet I'm testing from:
If-Data-Exists-in-range-in-worksheet-a-then-delete-corresponding-row-in-worksheet-b.xlsx | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | bv email | bv state | bv reason | bv score | ||
2 | c.martini@missoni.it | undeliverable | invalid_domain | 0 | ||
3 | cjones@gmail.com | undeliverable | invalid_domain | 0 | ||
4 | e.alby@gmail.com | undeliverable | invalid_domain | 0 | ||
5 | e.alby@mac.com | undeliverable | invalid_domain | 0 | ||
6 | fenderbender@gmail.com | undeliverable | invalid_smtp | 0 | ||
7 | grove131@hotmail.com | undeliverable | invalid_domain | 0 | ||
8 | rgrove@grove.com | undeliverable | invalid_domain | 0 | ||
BadEmailList |
And proper end results I should have after running script:
If-Data-Exists-in-range-in-worksheet-a-then-delete-corresponding-row-in-worksheet-b.xlsx | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | |||
1 | Category A | Category B | Category C | Category D | Category E | Category F | Category G | Category H | Category I | Category J | FirstName | LastName | Personal | Close Personal | What | Company | |||
2 | x | x | x | x | x | x | Albert | Hammond | x | x | Guitarist | Roland | ahammond@gmail.com | ||||||
3 | x | x | x | x | Cynthia | Jones | Painter | Warhol Inc. | info@warhol.com | ||||||||||
4 | x | x | x | x | Cynthia | Jones | Painter | Warhol Inc. | cynthia@warhol.inc | ||||||||||
5 | x | Derrick | Lewis | Carpenter | All Done Right Inc. | derrick_lewis@alldoneright.org | |||||||||||||
6 | x | Edward | Alby | x | Lighting Designer | Brighter Days | albyed@brigherdays.com | ||||||||||||
7 | x | x | x | x | Jeff | Cousins | x | x | Dancer | Breakin Up Inc. | jeffcousins@gmail.com | ||||||||
8 | x | x | Marcus | Kaufman | x | Singer | Lauren Nicole | marcusk@ln.com | |||||||||||
9 | x | Lauren | Betts | Drummer | First Instruments | laurenbetts@hotmail.com | |||||||||||||
10 | x | x | x | x | Pauline | Huerta | x | Acrobat | Mission Inc. | aria101@aol.com | |||||||||
11 | x | x | x | x | x | x | x | Richard | Grove | x | Broadcaster | ABC | richard.grove@abc.com | ||||||
12 | x | x | x | x | x | x | x | Richard | Grove | x | Broadcaster | ABC | rgrove@gmail.com | ||||||
After |
Any help would be greatly appreciated!