If data exists in a range from sheet A, then delete corresponding row in sheet B

mbnnyc

New Member
Joined
Mar 15, 2021
Messages
5
Office Version
  1. 2013
Platform
  1. Windows
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:

If-Data-Exists-in-range-in-worksheet-a-then-delete-corresponding-row-in-worksheet-b.xlsx
ABCDEFGHIJKLMNOPQ
1Category ACategory BCategory CCategory DCategory ECategory FCategory GCategory HCategory ICategory JFirstNameLastNamePersonalClose PersonalWhatCompanyEmail
2xxxxxxAlbertHammondxxGuitaristRolandahammond@gmail.com
3xxxxxxAlbertHammondxxGuitaristRolandfenderbender@gmail.com
4xxxxCynthiaJonesPainterWarhol Inc.info@warhol.com
5xxxxCynthiaJonesPainterWarhol Inc.cynthia@warhol.inc
6xxxxCynthiaJonesPainterWarhol Inc.cjones@gmail.com
7xDerrickLewisCarpenterAll Done Right Inc.derrick_lewis@alldoneright.org
8xEdwardAlbyxLighting DesignerBrighter Daysalbyed@brigherdays.com
9xEdwardAlbyxLighting DesignerBrighter Dayse.alby@gmail.com
10xEdwardAlbyxLighting DesignerBrighter Dayse.alby@mac.com
11xxxxJeffCousinsxxDancerBreakin Up Inc.jeffcousins@gmail.com
12xxMarcusKaufmanxSingerLauren Nicolemarcusk@ln.com
13xLaurenBettsDrummerFirst Instrumentslaurenbetts@hotmail.com
14xxxxPaulineHuertaxAcrobatMission Inc.aria101@aol.com
15xxxxxxxRichardGrovexBroadcasterABCc.martini@missoni.it
16xxxxxxxRichardGrovexBroadcasterABCrichard.grove@abc.com
17xxxxxxxRichardGrovexBroadcasterABCrgrove@gmail.com
18xxxxxxxRichardGrovexBroadcasterABCgrove131@hotmail.com
19xxxxxxxRichardGrovexBroadcasterABCrgrove@grove.com
Before


Sheet I'm testing from:

If-Data-Exists-in-range-in-worksheet-a-then-delete-corresponding-row-in-worksheet-b.xlsx
ABCD
1bv emailbv statebv reasonbv score
2c.martini@missoni.itundeliverableinvalid_domain0
3cjones@gmail.comundeliverableinvalid_domain0
4e.alby@gmail.comundeliverableinvalid_domain0
5e.alby@mac.comundeliverableinvalid_domain0
6fenderbender@gmail.comundeliverableinvalid_smtp0
7grove131@hotmail.comundeliverableinvalid_domain0
8rgrove@grove.comundeliverableinvalid_domain0
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
ABCDEFGHIJKLMNOPQ
1Category ACategory BCategory CCategory DCategory ECategory FCategory GCategory HCategory ICategory JFirstNameLastNamePersonalClose PersonalWhatCompanyEmail
2xxxxxxAlbertHammondxxGuitaristRolandahammond@gmail.com
3xxxxCynthiaJonesPainterWarhol Inc.info@warhol.com
4xxxxCynthiaJonesPainterWarhol Inc.cynthia@warhol.inc
5xDerrickLewisCarpenterAll Done Right Inc.derrick_lewis@alldoneright.org
6xEdwardAlbyxLighting DesignerBrighter Daysalbyed@brigherdays.com
7xxxxJeffCousinsxxDancerBreakin Up Inc.jeffcousins@gmail.com
8xxMarcusKaufmanxSingerLauren Nicolemarcusk@ln.com
9xLaurenBettsDrummerFirst Instrumentslaurenbetts@hotmail.com
10xxxxPaulineHuertaxAcrobatMission Inc.aria101@aol.com
11xxxxxxxRichardGrovexBroadcasterABCrichard.grove@abc.com
12xxxxxxxRichardGrovexBroadcasterABCrgrove@gmail.com
After


Any help would be greatly appreciated!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Please provide the link(s)



If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top