SOLVED

Delete Duplicate Rows With Text Arranged in Different Columns

%3CLINGO-SUB%20id%3D%22lingo-sub-1040386%22%20slang%3D%22en-US%22%3EDelete%20Duplicate%20Rows%20With%20Text%20Arranged%20in%20Different%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1040386%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%20I%20have%20built%20500%20NBA%20fantasy%20team%20lineups%20composed%20of%208%20players%20each.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESome%20players%20can%20be%20designated%20in%20multiple%20positions%20(different%20columns)%2C%20and%20this%20leads%20to%20duplicate%20teams.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20example%2C%20on%20Rows%20105%3A106%20of%20the%20attached%2C%20the%20two%20teams%20are%20composed%20of%20identical%20players%20in%20different%20positions.%20I%20only%20want%20one%20lineup%2C%20not%20two%20lineups%20of%20the%20same%20players.%3CBR%20%2F%3E%3CBR%20%2F%3ETo%20clarify%2C%20Cell%20A105%20contains%20%22Malik%20Monk%20(13878917)%22%20in%20the%20PG%20position%2C%20and%20Cell%20F106%20contains%20%22Malik%20Monk%20(13878917)%22%20in%20the%20G%20position%20(Column%20headers%20in%20Row%201).%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EAs%20you%20can%20see%2C%20the%20team%20lineups%20in%20Row%20105%20and%20106%20contain%20identical%20players%2C%20but%20they%20are%20just%20arranged%20in%20different%20columns%20(A%20and%20F).%20I'd%20like%20to%20delete%20the%20duplicate%20row.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3ETo%20further%20clarify%2C%20I%20would%20like%20to%20delete%20all%20duplicates%20rows%20in%20this%20worksheet%2C%20not%20just%20adjacent%20rows%2C%20and%20to%20delete%20rows%20whether%20teams%20are%20duplicated%20in%20the%20same%20column%20or%20not.%20For%20example%2C%20Row%202%20and%20Row%20501%20are%20identical%20and%20arranged%20in%20the%20same%20column%20as%20well%2C%20but%20only%20one%20should%20be%20kept.%3CBR%20%2F%3E%3CBR%20%2F%3EMy%20preference%20is%20to%20retain%20the%20first%20row.%20So%20in%20the%20above%20example%20with%20Malik%20Monk%2C%20I%20would%20prefer%20to%20keep%20Row%20105%20and%20delete%20106.%3CBR%20%2F%3E%3CBR%20%2F%3EAnother%20preference%20is%20to%20delete%20duplicate%20rows%2C%20not%20just%20the%20data%20itself%20--%20no%20empty%20rows%20between%20data.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20it's%20important%20to%20retain%20the%20order%20of%20the%20rows.%20Teams%20in%20the%20higher%20rows%20have%20higher%20projected%20points.%20For%20example%2C%20the%20team%20in%20Row%202%20has%20higher%20projected%20points%20than%20Row%203.%20I'd%20like%20to%20retain%20the%20order.%3CBR%20%2F%3E%3CBR%20%2F%3EIn%20the%20attached%20file%2C%20there%20are%20many%20duplicate%20rows.%20So%20I%20would%20not%20be%20surprised%20if%20the%20500%20teams%20gets%20narrowed%20down%20to%20200%20or%20even%20100.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EI%20very%20much%20appreciate%20the%20help!%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1040386%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1040435%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Duplicate%20Rows%20With%20Text%20Arranged%20in%20Different%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1040435%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F471778%22%20target%3D%22_blank%22%3E%40steveccc%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20understood%20the%20following%3A%3C%2FP%3E%3CP%3E%3CSTRONG%3E1.%20You%20want%20to%20remove%20the%20rows%20which%20has%20same%20line%20up%20(Players%20in%20same%20position)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EUse%20Concatenate%20function%20to%20combine%20all%20cells%20in%20the%20row.%20Once%20combined%20use%20conditional%20formating%20to%20find%20duplicate.%20It%20will%20help%20you%20find%20same%20player%20in%20same%20position%20entered%20twice%20or%20more.%3C%2FP%3E%3CP%3EUse%20remove%20duplicate%20to%20remove%20the%20duplicate%20one.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2.%3CEM%3E%3CSTRONG%3E%20%22For%20example%2C%20on%20Rows%20105%3A106%20of%20the%20attached%2C%20the%20two%20teams%20are%20composed%20of%20identical%20players%20in%20different%20positions.%20I%20only%20want%20one%20lineup%2C%20not%20two%20lineups%20of%20the%20same%20players.%22%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CEM%3EPlease%20explain%3F%3F%3F%3F%3F%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3E%3CSTRONG%3ESee%20Colown%20I%20of%20the%20sheet%20attached%3C%2FSTRONG%3E%3C%2FEM%3E%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-1040625%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Duplicate%20Rows%20With%20Text%20Arranged%20in%20Different%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1040625%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F431214%22%20target%3D%22_blank%22%3E%40CA_PUNIT_AGARWAL%3C%2FA%3E%26nbsp%3BThanks%20CA_Punit.%20This%20is%20a%20clever%20solution.%20It%20works%20well%20when%20players%20are%20in%20the%20same%20column.%20But%20it%20does%20not%20work%20when%20they%20appear%20in%20different%20columns.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELook%20at%20the%20teams%20in%20Row%20105%20and%20106%20for%20example%20--%20they%20are%20identical.%3CBR%20%2F%3E%3CBR%20%2F%3EThese%20two%20teams%20have%20the%20exact%20same%20players%20as%20one%20another%20--%20but%20the%20players%20appear%20in%20a%20different%20order%20from%20one%20another%20(different%20column%20headers).%3CBR%20%2F%3E%3CBR%20%2F%3EMalik%20Monk%20appears%20in%20A105%20and%20F106.%3CBR%20%2F%3EJames%20Harden%20appears%20in%20F105%20and%20B106.%3CBR%20%2F%3EMalcolm%20Brogdon%20appears%20in%20B105%20and%20A106.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EThe%20same%208%20players%20in%20Row%20105%20appear%20in%20Row%20106.%20They%20are%20in%20just%20different%20order.%3CBR%20%2F%3E%3CBR%20%2F%3EHow%20can%20I%20filter%20out%20and%20delete%20Row%20106%2C%20and%20others%20like%20it%3F%20Thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1040675%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Duplicate%20Rows%20With%20Text%20Arranged%20in%20Different%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1040675%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F471778%22%20target%3D%22_blank%22%3E%40steveccc%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20to%20solve%20your%20query%3A%3C%2FP%3E%3CP%3ESolution%20Steps%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20Firstly%20i%20have%20assigned%20numbers%20to%20each%20unique%20person%20name%20(in%20Sheet%201)%3C%2FP%3E%3CP%3E2.%20I%20have%20used%20index%20and%20Match%20function%20to%20assign%20values%20(in%20sheet%201)%20to%20each%20cell%3C%2FP%3E%3CP%3E3.%20I%20add%20up%20those%20values.%20Now%20since%20every%20person%20is%20assigned%20different%20values%20so%20if%20sum%20of%20values%20are%20equal%20in%20different%20rows%20than%20they%20are%20identical%20(Persons%20in%20rows%20with%20same%20or%20different%20positions)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20check%20it%20out%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1040686%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Duplicate%20Rows%20With%20Text%20Arranged%20in%20Different%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1040686%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F431214%22%20target%3D%22_blank%22%3E%40CA_PUNIT_AGARWAL%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWorks%20perfectly%2C%20thank%20you!%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20is%20a%20very%20clever%20solution.%20I%20did%20not%20think%20about%20assigning%20numbers%20to%20text%20values.%20What%20I%20especially%20like%20about%20it%20is%20that%20it's%20simple%20enough%20for%20me%20to%20immediately%20understand%20and%20add%20to%20my%20skill%20set.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1040767%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Duplicate%20Rows%20With%20Text%20Arranged%20in%20Different%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1040767%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F431214%22%20target%3D%22_blank%22%3E%40CA_PUNIT_AGARWAL%3C%2FA%3E%26nbsp%3B%20Hello%2C%20I've%20been%20testing%20the%20worksheet%20and%20ran%20into%20three%20issues.%3CBR%20%2F%3E%3CBR%20%2F%3E1)%20False%20positives.%3CBR%20%2F%3EFor%20example%2C%20in%20the%20attached%20updated%20spreadsheet%2C%20a%20lineup%20in%20Row%2082%20and%20a%20lineup%20in%20Row%20145%20are%20not%20identical%2C%20but%20they%20have%20the%20same%20number%20in%20Column%20Q.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20tried%20using%20the%20RAND%20function%20to%20make%20the%20numbers%20more%20uneven%20so%20less%20of%20a%20chance%20of%20matching%2C%20but%20I%20still%20get%20false%20positives.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E2)%20Retain%20row%20structure.%3CBR%20%2F%3EI%20don't%20want%20to%20use%20the%20%22Remove%20Duplicates%22%20function%20because%20it%20deletes%20the%20Row.%20I%20actually%20just%20want%20to%20clear%20all%20the%20data%20in%20that%20row.%20Look%20at%20Row%203%20and%20Row%2010%20for%20example.%20Row%2010%20contained%20the%20duplicate%20lineup%2C%20and%20I%20cleared%20that%20row%20manually.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E3)%20Speed.%20How%20do%20we%20do%20this%20quickly%3F%20I%20want%20to%20be%20able%20to%20filter%20and%20clear%20out%20these%20duplicate%20rows%20almost%20immediately.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1040768%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Duplicate%20Rows%20With%20Text%20Arranged%20in%20Different%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1040768%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F471778%22%20target%3D%22_blank%22%3E%40steveccc%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'm%20not%20sure%20that%20works%20correctly.%20%3D1%2B2%2B7%20and%20%3D1%2B3%2B6%20gives%20the%20same%20sum%2C%20but%20their%20different%20number%20in%20each%20set.%20And%20here%20is%20sample%20from%20previous%20file%20if%20sort%20players%20ID%3As%20which%20sum%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20430px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F159474i74942C346D6C1704%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'd%20create%20helper%20range%20with%20names%20sorted%20alphabetically%20in%20each%20row%2C%20after%20that%20we%20may%20select%20them%20together%20and%20remove%20duplicates%20based%20on%20helper%20table%2C%20and%20like.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20attached%20file%20it's%20from%20column%20I.%20To%20simplify%20formulas%20columns%20index%20is%20added%20in%20first%20row.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20763px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F159475i622E7DB2340130EF%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3BIn%20J2%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DINDEX(%24A2%3A%24H2%2C1%2CMATCH(J%241%2CCOUNTIF(%24A2%3A%24H2%2C%22%26lt%3B%3D%22%26amp%3B%24A2%3A%24H2)%2C0))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Eand%20drag%20it%20to%20the%20right%20and%20down.%20After%20that%20you%20may%20play%20with%20filters%20or%20physically%20Data-%26gt%3BRemove%20Duplicates.%3C%2FP%3E%0A%3CP%3EThat%20could%20be%20bit%20easier%20with%20Power%20Query%20or%20Dynamic%20Arrays%2C%20but%20as%20I%20remember%20for%20this%20project%20are%20formulas%20only.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1040805%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Duplicate%20Rows%20With%20Text%20Arranged%20in%20Different%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1040805%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20Sergei.%20I%20want%20to%20retain%20the%20original%20order%20of%20the%20lineups%2C%20and%20not%20sure%20how%20to%20do%20that%20with%20the%20solution%20you%20just%20posted.%3C%2FP%3E%3CP%3EI%20took%20your%20worksheet%20from%20above%2C%20and%20concatenated%20the%20helper%20column%20data%20in%20Column%20R.%20Then%20I%20added%20a%20TRUE%2FFALSE%20helper%20column%20in%20Column%20S.%20(see%20attached).%3C%2FP%3E%3CP%3EI%20know%20how%20to%20use%20filter%20to%20delete%20all%20the%20matches%20indicated%20by%20TRUE%20in%20column%20S.%20However%2C%20I%20don't%20understand%20how%20I%20can%20use%20that%20to%20clear%20duplicate%20lineup%20data%20in%20Columns%20A%3AH.%3C%2FP%3E%3CP%3EI'm%20using%20the%20word%20%22clear%22%20intentionally.%20I%20don't%20want%20to%20delete%20the%20duplicate%20rows.%20I%20want%20to%20clear%20the%20data%20from%20the%20rows%20in%20order%20to%20retain%20the%20order%20in%20which%20the%20original%20data%20was%20inputted.%20Thanks%20for%20taking%20a%20look.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1041193%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Duplicate%20Rows%20With%20Text%20Arranged%20in%20Different%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1041193%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F471778%22%20target%3D%22_blank%22%3E%40steveccc%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20remove%20duplicates%20select%20data%20from%20column%20A%20to%20column%20R%2C%20unselect%20all%2C%20and%20select%20only%20R%20(or%20inwhich%20column%20you%20have%20duplicates).%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20448px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F159511iDE135578A7BC59E9%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22image.png%22%20title%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ECleaning%20the%20data%20is%20not%20so%20easy%20with%20formulas.%20If%20only%20generate%20one%20more%20range%20into%20which%20by%20formulas%20copy%20information%20from%20initial%20one%20substituting%20it%20by%20empty%20texts%20for%20duplicated%20records.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHowever%2C%20Remove%20Duplicates%20shall%20not%20change%20the%20order%20of%20records%2C%20it%20keeps%20first%20met%20record%20and%20remove%20all%20duplicates%20which%20are%20after%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1044977%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Duplicate%20Rows%20With%20Text%20Arranged%20in%20Different%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1044977%22%20slang%3D%22en-US%22%3E%3CP%3ES%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESir%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20I%20have%20selected%20the%20numbers%20serially%20so%20the%20formula%20has%20turned%20out%20to%20be%20incorrect.%3C%2FP%3E%3CP%3ESo%20if%20we%20follow%20maths%20and%20create%20numbering%20in%20such%20a%20way%20numbers%20cannot%20add%20up%20in%20two%20or%20more%20variable%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20Eg%20if%20we%20assign%201%2C%2037%2C73%20on%20a%20difference%20of%2036%20(36%20because%20total%20no%20of%20unique%20name%20is%2036)%20so%20number%20cannot%20add%20up%20if%20we%20select%20different%20variables.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20it%20will%20work%20and%20solve%20the%20purpose%20in%20simple%20way.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1045259%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Duplicate%20Rows%20With%20Text%20Arranged%20in%20Different%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1045259%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F431214%22%20target%3D%22_blank%22%3E%40CA_PUNIT_AGARWAL%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20continue%20with%20numbers%20we%20have%201%2C%2037%2C%2073%2C%20109.%20But%20with%201%2B109%20%3D%2037%2B73%20we%20have%20different%20pairs%20of%20players.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnyway%2C%20perhaps%20it%20could%20be%20the%20combination%20which%20works%2C%20but%20from%20my%20point%20of%20view%20that%20more%20complex%20than%20simple%20INDEX%2FMATCH.%20You%20have%20to%20extract%20unique%20names%20for%20each%20data%20set%20(we%20have%20no%20dynamic%20arrays%20here)%20or%20keep%20and%20update%20the%20list%20of%20all%20players%20in%20North%20America%20league%20with%20their%20own%20numbers.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1046755%22%20slang%3D%22en-US%22%3ERe%3A%20Delete%20Duplicate%20Rows%20With%20Text%20Arranged%20in%20Different%20Columns%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1046755%22%20slang%3D%22en-US%22%3EI%20understand%20thanks.%20Was%20hoping%20there%20was%20an%20easy%20way%20to%20retain%20the%20original%20Row.%20So%20for%20example%20if%20we%20have%20this%3A%3CBR%20%2F%3ERow%201%3A%20Apple%3CBR%20%2F%3ERow%202%3A%20Apple%3CBR%20%2F%3ERow%203%3A%20Orange%3CBR%20%2F%3E%3CBR%20%2F%3EAfter%20removing%20duplicates%20it%20would%20look%20like%20this%3A%3CBR%20%2F%3ERow%201%3A%20Apple%3CBR%20%2F%3ERow%202%3A%3CBR%20%2F%3ERow%203%3A%20Orange%3CBR%20%2F%3E%3CBR%20%2F%3EThat%20is%2C%20Row%202%20would%20now%20be%20blank%20instead%20of%20deleted.%3C%2FLINGO-BODY%3E
Contributor

Hello, I have built 500 NBA fantasy team lineups composed of 8 players each.

 

Some players can be designated in multiple positions (different columns), and this leads to duplicate teams.

 

For example, on Rows 105:106 of the attached, the two teams are composed of identical players in different positions. I only want one lineup, not two lineups of the same players.

To clarify, Cell A105 contains "Malik Monk (13878917)" in the PG position, and Cell F106 contains "Malik Monk (13878917)" in the G position (Column headers in Row 1). 

As you can see, the team lineups in Row 105 and 106 contain identical players, but they are just arranged in different columns (A and F). I'd like to delete the duplicate row. 

To further clarify, I would like to delete all duplicates rows in this worksheet, not just adjacent rows, and to delete rows whether teams are duplicated in the same column or not. For example, Row 2 and Row 501 are identical and arranged in the same column as well, but only one should be kept.

My preference is to retain the first row. So in the above example with Malik Monk, I would prefer to keep Row 105 and delete 106.

Another preference is to delete duplicate rows, not just the data itself -- no empty rows between data.

 

Also, it's important to retain the order of the rows. Teams in the higher rows have higher projected points. For example, the team in Row 2 has higher projected points than Row 3. I'd like to retain the order.

In the attached file, there are many duplicate rows. So I would not be surprised if the 500 teams gets narrowed down to 200 or even 100. 

I very much appreciate the help!

11 Replies

@steveccc 

I understood the following:

1. You want to remove the rows which has same line up (Players in same position)

Use Concatenate function to combine all cells in the row. Once combined use conditional formating to find duplicate. It will help you find same player in same position entered twice or more.

Use remove duplicate to remove the duplicate one.

 

2. "For example, on Rows 105:106 of the attached, the two teams are composed of identical players in different positions. I only want one lineup, not two lineups of the same players."

Please explain?????

 

See Colown I of the sheet attached

 

 

 

 

@CA_PUNIT_AGARWAL Thanks CA_Punit. This is a clever solution. It works well when players are in the same column. But it does not work when they appear in different columns.

 

Look at the teams in Row 105 and 106 for example -- they are identical.

These two teams have the exact same players as one another -- but the players appear in a different order from one another (different column headers).

Malik Monk appears in A105 and F106.
James Harden appears in F105 and B106.
Malcolm Brogdon appears in B105 and A106. 


The same 8 players in Row 105 appear in Row 106. They are in just different order.

How can I filter out and delete Row 106, and others like it? Thanks!

best response confirmed by steveccc (Contributor)
Solution

 @steveccc 

 

I have tried to solve your query:

Solution Steps:

 

1. Firstly i have assigned numbers to each unique person name (in Sheet 1)

2. I have used index and Match function to assign values (in sheet 1) to each cell

3. I add up those values. Now since every person is assigned different values so if sum of values are equal in different rows than they are identical (Persons in rows with same or different positions)

 

Please check it out

 

@CA_PUNIT_AGARWAL 

 

Works perfectly, thank you!

This is a very clever solution. I did not think about assigning numbers to text values. What I especially like about it is that it's simple enough for me to immediately understand and add to my skill set.  

@CA_PUNIT_AGARWAL  Hello, I've been testing the worksheet and ran into three issues.

1) False positives.
For example, in the attached updated spreadsheet, a lineup in Row 82 and a lineup in Row 145 are not identical, but they have the same number in Column Q.

I tried using the RAND function to make the numbers more uneven so less of a chance of matching, but I still get false positives.

2) Retain row structure.
I don't want to use the "Remove Duplicates" function because it deletes the Row. I actually just want to clear all the data in that row. Look at Row 3 and Row 10 for example. Row 10 contained the duplicate lineup, and I cleared that row manually. 

3) Speed. How do we do this quickly? I want to be able to filter and clear out these duplicate rows almost immediately. 

 

Thanks for your help!

@steveccc 

I'm not sure that works correctly. =1+2+7 and =1+3+6 gives the same sum, but their different number in each set. And here is sample from previous file if sort players ID:s which sum

image.png

 

I'd create helper range with names sorted alphabetically in each row, after that we may select them together and remove duplicates based on helper table, and like. 

In attached file it's from column I. To simplify formulas columns index is added in first row.

image.png

 In J2

=INDEX($A2:$H2,1,MATCH(J$1,COUNTIF($A2:$H2,"<="&$A2:$H2),0))

and drag it to the right and down. After that you may play with filters or physically Data->Remove Duplicates.

That could be bit easier with Power Query or Dynamic Arrays, but as I remember for this project are formulas only.

@Sergei Baklan 

Thanks Sergei. I want to retain the original order of the lineups, and not sure how to do that with the solution you just posted.

I took your worksheet from above, and concatenated the helper column data in Column R. Then I added a TRUE/FALSE helper column in Column S. (see attached).

I know how to use filter to delete all the matches indicated by TRUE in column S. However, I don't understand how I can use that to clear duplicate lineup data in Columns A:H.

I'm using the word "clear" intentionally. I don't want to delete the duplicate rows. I want to clear the data from the rows in order to retain the order in which the original data was inputted. Thanks for taking a look.

@steveccc 

To remove duplicates select data from column A to column R, unselect all, and select only R (or inwhich column you have duplicates).

image.png

Cleaning the data is not so easy with formulas. If only generate one more range into which by formulas copy information from initial one substituting it by empty texts for duplicated records.

 

However, Remove Duplicates shall not change the order of records, it keeps first met record and remove all duplicates which are after it.

S@Sergei Baklan 

 

Sir,

 

As I have selected the numbers serially so the formula has turned out to be incorrect.

So if we follow maths and create numbering in such a way numbers cannot add up in two or more variable

 

For Eg if we assign 1, 37,73 on a difference of 36 (36 because total no of unique name is 36) so number cannot add up if we select different variables.

 

I think it will work and solve the purpose in simple way.

@CA_PUNIT_AGARWAL 

If continue with numbers we have 1, 37, 73, 109. But with 1+109 = 37+73 we have different pairs of players.

 

Anyway, perhaps it could be the combination which works, but from my point of view that more complex than simple INDEX/MATCH. You have to extract unique names for each data set (we have no dynamic arrays here) or keep and update the list of all players in North America league with their own numbers.

 

I understand thanks. Was hoping there was an easy way to retain the original Row. So for example if we have this:
Row 1: Apple
Row 2: Apple
Row 3: Orange

After removing duplicates it would look like this:
Row 1: Apple
Row 2:
Row 3: Orange

That is, Row 2 would now be blank instead of deleted.