SOLVED
Home

Delete Rows Based On Cell Contents Matching Cell Contents in Other Worksheet

%3CLINGO-SUB%20id%3D%22lingo-sub-544357%22%20slang%3D%22en-US%22%3EDelete%20Rows%20Based%20On%20Cell%20Contents%20Matching%20Cell%20Contents%20in%20Other%20Worksheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-544357%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20All%2C%3C%2FP%3E%3CP%3EThis%20is%20my%20first%20visit%20and%20my%20first%20post%20in%20this%20group.%26nbsp%3B%20I%20haven't%20been%20able%20to%20find%20the%20answer%20to%20an%20issue%20I%20have%20so%20here%20I%20am.%26nbsp%3B%20I%20have%20worked%20with%20Excel%20and%20formulas%20for%20many%20years%20but%20I%20am%20stumped%20in%20figuring%20this%20one%20out.%26nbsp%3B%20Here%20is%20the%20scenario%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20contact%20list%20in%20one%20worksheet%20containing%20names%2C%20company%20and%20email%20address.%26nbsp%3B%20I%20have%20other%20worksheets%20which%20contain%20email%20addresses%20of%20contacts%20who%20have%20marked%20my%20emails%20as%20Spam%2C%20Unsubscribed%20or%20are%20undeliverable.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20challenge%20is%20to%20delete%20the%20rows%20in%20the%20main%20contact%20list%20that%20contain%20the%20email%20addresses%20that%20are%20found%20in%20the%20other%20worksheets.%26nbsp%3B%20I'm%20dealing%20with%20thousands%20of%20contacts%20and%20the%20list%20updates%20will%20be%20ongoing%20so%20I%20really%20need%20to%20automate%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20any%20help%20you%20can%20provide.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-544357%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-544529%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Rows%20Based%20On%20Cell%20Contents%20Matching%20Cell%20Contents%20in%20Other%20Worksheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-544529%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F337613%22%20target%3D%22_blank%22%3E%40TPCTech%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eyou%20can%20do%20the%20following%3A%3C%2FP%3E%3CP%3E-%20make%20sure%20your%20main%20list%20is%20an%20Excel%20Table%3C%2FP%3E%3CP%3E-%20add%20one%20column%20to%20your%20contact%20list%26nbsp%3B%3C%2FP%3E%3CP%3E-%20in%20the%20columns%20added%2C%20write%20a%20formula%20like%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%3D%20IF(OR(ISNA(MATCH(email%20cell%2C%20email%20column%20in%20the%20%3CSPAN%3ESpam%26nbsp%3B%3C%2FSPAN%3Esheet%2C%200)%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20ISNA(MATCH(email%20cell%2C%20email%20column%20in%20the%20%3CSPAN%3EUnsubscribed%20%3C%2FSPAN%3Esheet%2C%200)%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20ISNA(MATCH(email%20cell%2C%20email%20column%20in%20the%20%3CSPAN%3EUndeliverable%3C%2FSPAN%3Esheet%2C%200)%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20)%2C%22delete%22%2C%20%22%22)%3C%2FP%3E%3CP%3E-%20you%20should%20get%20the%20word%20%22delete%22%20in%20all%20the%20rows%20that%20have%20an%20email%20that%20is%20included%20in%20at%20least%20one%20of%20the%20other%203%20sheets.%3C%2FP%3E%3CP%3E-%20filter%20the%20table%20in%20the%20column%20by%20%22delete%22%20and%20deleted%20the%20rows%20filtered%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELet%20me%20know%20if%20this%20works.%20Good%20luck!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-548822%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Rows%20Based%20On%20Cell%20Contents%20Matching%20Cell%20Contents%20in%20Other%20Worksheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-548822%22%20slang%3D%22en-US%22%3EThanks!%20That%20makes%20sense%20to%20me.%20I'll%20give%20it%20a%20shot.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-549528%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Rows%20Based%20On%20Cell%20Contents%20Matching%20Cell%20Contents%20in%20Other%20Worksheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-549528%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F302344%22%20target%3D%22_blank%22%3E%40Celia_Alves%3C%2FA%3E%26nbsp%3B!%26nbsp%3B%20That%20got%20me%20going%20and%20I%20really%20appreciate%20the%20response%20and%20solution.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-549567%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Rows%20Based%20On%20Cell%20Contents%20Matching%20Cell%20Contents%20in%20Other%20Worksheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-549567%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F337613%22%20target%3D%22_blank%22%3E%40TPCTech%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EReally%20glad%20that%20I%20could%20help!%20Thank%20you%20for%20the%20feedback!%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-885098%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Rows%20Based%20On%20Cell%20Contents%20Matching%20Cell%20Contents%20in%20Other%20Worksheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-885098%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20I%20must%20try.%20I%20am%20trying%20to%20delete%20the%20rows%20from%20one%20worksheet%20(MD%20and%20VA%20Contacts%20CSV)%20because%20the%20row%20contain%20any%20word%20or%20phrase%20from%20another%20list%20worksheet%20(Expired%20Contact%20Information%20List).%20Thank%20you%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F302344%22%20target%3D%22_blank%22%3E%40Celia_Alves%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-885129%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Rows%20Based%20On%20Cell%20Contents%20Matching%20Cell%20Contents%20in%20Other%20Worksheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-885129%22%20slang%3D%22en-US%22%3E%3CP%3EWhat%20did%20I%20do%20incorrectly%20I%20receive%26nbsp%3Bthe%20response%20too%20many%20Arguments%3F%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F302344%22%20target%3D%22_blank%22%3E%40Celia_Alves%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3D%20IF(OR(ISNA(MATCH(A1..A56%2C%201059271022-domain-invalid%2C%200)%2C)%2C%22delete%22%2C%20%22%22)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-887746%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Rows%20Based%20On%20Cell%20Contents%20Matching%20Cell%20Contents%20in%20Other%20Worksheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-887746%22%20slang%3D%22en-US%22%3E%3CP%3Ehi%2C%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F417800%22%20target%3D%22_blank%22%3E%40RodwellSmith%3C%2FA%3E%3C%2FP%3E%3CP%3EPlease%20try%20the%20following%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3D%20IF(ISNA(MATCH(cell%20with%20email%20address%20to%20search%20for%20on%20second%20sheet%2C%20column%20with%20emails%20on%20second%20sheet%2C%200))%2C%22delete%22%2C%20%22%22)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20example%2C%20if%20the%20first%20email%20address%20that%20you%20want%20to%20check%20is%20on%20cell%20A1%20of%20sheet1%20and%20the%20column%20with%20emails%20in%20sheet2%20is%20column%20C%2C%20write%20this%20formula%20in%20the%20column%20of%20sheet%201%20where%20you%20want%20to%20run%20the%20check%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3D%20IF(ISNA(MATCH(A1%2C%20'Sheet2!'C%3AC%2C%200))%2C%22delete%22%2C%20%22%22)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20it%20doesn't%20work%2C%20please%20feel%20free%20to%20send%20the%20file%20with%20some%20mock%20data%20and%20I'll%20see%20if%20I%20can%20help%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-887827%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Rows%20Based%20On%20Cell%20Contents%20Matching%20Cell%20Contents%20in%20Other%20Worksheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-887827%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20very%20much%20for%20replying%2C%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F302344%22%20target%3D%22_blank%22%3E%40Celia_Alves%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20rearrange%20and%20table%20the%20format%20to%20have%20both%20sheets%20in%20the%20same%20workbook.%20%22Sheet%201%22%20is%20the%20cell%20with%20the%20subject%20%22invalid%20domain%22%20to%20search%20for%20then%20delete%20row%20from%20registered%20contacts%20or%20%22Sheet%202%22.%20(Pardon%20me%2C%20I%20renamed%20the%20sheets%20to%20keep%20my%20focus)%26nbsp%3B%20Here%20is%20the%20new%20formulary%20accordingly%3C%2FP%3E%3CP%3E%26nbsp%3B%20%3CFONT%3E%3D%20IF(ISNA(MATCH(A1%2C%20Sheet%202!'E%3AE%2C%200))%2C%22delete%22%2C%20%22%22)%20%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3EI%20think%20we%20are%20onto%20something%20now!%20However%2C%20so%20I%20am%20not%20mistaken%3B%20which%20sheet%20am%20I%20making%20the%20column%20that%20will%20contain%20the%20word%20%22delete%22%20I%20tried%20both%20sheets%20and%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3E%26nbsp%3B%3D%20IF(ISNA(MATCH(A1%2C%20'Sheet2!'E%3AE%2C%200))%2C%22delete%22%2C%20%22%22)%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3Ethen%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3E%26nbsp%3B%3D%20IF(ISNA(MATCH('Sheet%201!'A1%2C%20'Sheet2!'E%3AE%2C%200))%2C%22delete%22%2C%20%22%22)%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3EI%20think%20I%20may%20have%20missed%20something%20in%20placing%20the%20formula.%20Please%20find%20attached%20two%20snippets%20with%20Excel's%20responses.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%3EAgainThank%20you%20for%20helping%20me.%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-890338%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Rows%20Based%20On%20Cell%20Contents%20Matching%20Cell%20Contents%20in%20Other%20Worksheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-890338%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F417800%22%20target%3D%22_blank%22%3E%40RodwellSmith%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20put%20the%20formula%20in%20either%20sheet%2C%20depending%20on%20what%20you%20need.%20It%20seems%20that%20you%20still%20need%20to%20do%20other%20things%2C%20first.%20You%20mentioned%20domains%20and%20registered%20contacts.%20MATCH%20will%20look%20for%20the%20same%20string%20in%20the%20column%20that%20you%20indicate.%20For%20example%2C%20in%20your%20first%20formula%2C%20if%20you%20have%20an%20email%20address%20in%20cell%20A1%2C%20the%20formula%20will%20look%20for%20that%20same%20string%20of%20email%20address%20in%20column%20E%20of%20sheet2.%20If%20that%20email%20address%20does%20not%20exist%20in%20column%20E%2C%20then%20the%20formula%20return%20an%20error%20(N%2FA)%3C%2FP%3E%3CP%3EIn%20that%20case%2C%20the%20formula%20ISNA%20returns%20value%20True.%3C%2FP%3E%3CP%3EFinally%2C%20the%20formula%20IF%20will%20return%20%22delete.%22%3C%2FP%3E%3CP%3EThis%20would%20mean%20that%20you%20are%20looking%20to%20delete%20the%20email%20address%20in%20cell%20A1.%20Of%20course%2C%20the%20formula%20does%20not%20delete%20the%20email%20address%20from%20Sheet2%2C%20only%20makes%20note%20of%20it.%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMaybe%20it%20is%20not%20quite%20this%20you%20are%20looking%20for...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-890703%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Rows%20Based%20On%20Cell%20Contents%20Matching%20Cell%20Contents%20in%20Other%20Worksheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-890703%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F302344%22%20target%3D%22_blank%22%3E%40Celia_Alves%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20making%20more%20sense%20of%20this%20than%20I%20could.%20the%20email%20addresses%20I%20am%20trying%20to%20delete%20from%20the%20registration%20data%20are%20from%20expired%20domains.%20I%20have%20been%20experimenting%20with%20how%20to%20delete%20them%20from%20Sheet-2%20which%20has%20the%20table%20of%20registrants.%20Sheet-1%20has%20the%20list%20of%20emails%20from%20inactive%20domains.%20I%20have%20versed%20the%20formula%20so%20I%20can%20make%20sense%20and%20focus%20on%20the%20objective.%20Sheet-1%20will%20change%20but%20I%20wish%20to%20maintain%20Sheet2%20less%20the%20rows%20deleted%20by%20the%20objective%20formula%3A%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%224%22%3EHow%20could%20I%20write%20this%20formula%20in%20Excel%3F%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20size%3D%224%22%3E%22If%20contents%20of%20a%20cell%20on%20Sheet-1%20(say%20A1)%20%3CSPAN%3Ematch%3C%2FSPAN%3E%20any%20content%20of%20cells%20in%20column%20E%20on%20Sheet-2%20(say%20E2..E15000)%20delete%20the%20entire%20row%20on%20Sheet-2%22%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-909046%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Rows%20Based%20On%20Cell%20Contents%20Matching%20Cell%20Contents%20in%20Other%20Worksheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-909046%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F417800%22%20target%3D%22_blank%22%3E%40RodwellSmith%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESorry%20for%20the%20delay%20in%20responding.%3C%2FP%3E%3CP%3EThere%20is%20no%20formula%20to%20delete%20a%20row.%20you%20can%20use%20formulas%20to%20point%20you%20the%20rows%20that%20have%20data%20that%20you%20want%20to%20delete%2C%20but%20a%20formula%20won't%20perform%20that%20action%20for%20you.%20For%20that%2C%20you%20would%20have%20to%20use%20a%20macro%20that%20can%20be%20written%20with%20VBA%20programming%20language.%3C%2FP%3E%3CP%3EDoes%20it%20make%20sense%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
TPCTech
New Contributor

Hello All,

This is my first visit and my first post in this group.  I haven't been able to find the answer to an issue I have so here I am.  I have worked with Excel and formulas for many years but I am stumped in figuring this one out.  Here is the scenario:

 

I have a contact list in one worksheet containing names, company and email address.  I have other worksheets which contain email addresses of contacts who have marked my emails as Spam, Unsubscribed or are undeliverable.

 

My challenge is to delete the rows in the main contact list that contain the email addresses that are found in the other worksheets.  I'm dealing with thousands of contacts and the list updates will be ongoing so I really need to automate this.

 

Thanks for any help you can provide.

11 Replies
Solution

@TPCTech 

you can do the following:

- make sure your main list is an Excel Table

- add one column to your contact list 

- in the columns added, write a formula like this:

       = IF(OR(ISNA(MATCH(email cell, email column in the Spam sheet, 0),

                    ISNA(MATCH(email cell, email column in the Unsubscribed sheet, 0),

                    ISNA(MATCH(email cell, email column in the Undeliverablesheet, 0)

                    ),"delete", "")

- you should get the word "delete" in all the rows that have an email that is included in at least one of the other 3 sheets.

- filter the table in the column by "delete" and deleted the rows filtered

 

Let me know if this works. Good luck!

 

Thanks! That makes sense to me. I'll give it a shot.

Thanks @Celia_Alves !  That got me going and I really appreciate the response and solution.

@TPCTech 

Really glad that I could help! Thank you for the feedback! :-)

This I must try. I am trying to delete the rows from one worksheet (MD and VA Contacts CSV) because the row contain any word or phrase from another list worksheet (Expired Contact Information List). Thank you @Celia_Alves 

What did I do incorrectly I receive the response too many Arguments? @Celia_Alves 

= IF(OR(ISNA(MATCH(A1..A56, 1059271022-domain-invalid, 0),),"delete", "")

hi,@RodwellSmith

Please try the following: 

= IF(ISNA(MATCH(cell with email address to search for on second sheet, column with emails on second sheet, 0)),"delete", "")

 

For example, if the first email address that you want to check is on cell A1 of sheet1 and the column with emails in sheet2 is column C, write this formula in the column of sheet 1 where you want to run the check:

 

= IF(ISNA(MATCH(A1, 'Sheet2!'C:C, 0)),"delete", "")

 

If it doesn't work, please feel free to send the file with some mock data and I'll see if I can help you.

Thank you very much for replying,@Celia_Alves 

I have rearrange and table the format to have both sheets in the same workbook. "Sheet 1" is the cell with the subject "invalid domain" to search for then delete row from registered contacts or "Sheet 2". (Pardon me, I renamed the sheets to keep my focus)  Here is the new formulary accordingly

  = IF(ISNA(MATCH(A1, Sheet 2!'E:E, 0)),"delete", "")

I think we are onto something now! However, so I am not mistaken; which sheet am I making the column that will contain the word "delete" I tried both sheets and

 = IF(ISNA(MATCH(A1, 'Sheet2!'E:E, 0)),"delete", "")

then

 = IF(ISNA(MATCH('Sheet 1!'A1, 'Sheet2!'E:E, 0)),"delete", "")

I think I may have missed something in placing the formula. Please find attached two snippets with Excel's responses.

AgainThank you for helping me.

@RodwellSmith 

You can put the formula in either sheet, depending on what you need. It seems that you still need to do other things, first. You mentioned domains and registered contacts. MATCH will look for the same string in the column that you indicate. For example, in your first formula, if you have an email address in cell A1, the formula will look for that same string of email address in column E of sheet2. If that email address does not exist in column E, then the formula return an error (N/A)

In that case, the formula ISNA returns value True.

Finally, the formula IF will return "delete."

This would mean that you are looking to delete the email address in cell A1. Of course, the formula does not delete the email address from Sheet2, only makes note of it.

 

Maybe it is not quite this you are looking for...

 

 

 

 

@Celia_Alves 

Thank you for making more sense of this than I could. the email addresses I am trying to delete from the registration data are from expired domains. I have been experimenting with how to delete them from Sheet-2 which has the table of registrants. Sheet-1 has the list of emails from inactive domains. I have versed the formula so I can make sense and focus on the objective. Sheet-1 will change but I wish to maintain Sheet2 less the rows deleted by the objective formula:

How could I write this formula in Excel?

"If contents of a cell on Sheet-1 (say A1) match any content of cells in column E on Sheet-2 (say E2..E15000) delete the entire row on Sheet-2"

@RodwellSmith 

Sorry for the delay in responding.

There is no formula to delete a row. you can use formulas to point you the rows that have data that you want to delete, but a formula won't perform that action for you. For that, you would have to use a macro that can be written with VBA programming language.

Does it make sense?

 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
21 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies