How to remove rows with single value (multiple value remains)

%3CLINGO-SUB%20id%3D%22lingo-sub-1946991%22%20slang%3D%22en-US%22%3EHow%20to%20remove%20rows%20with%20single%20value%20(multiple%20value%20remains)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1946991%22%20slang%3D%22en-US%22%3EGreetings!%3CBR%20%2F%3EI%20need%20to%20remove%20students%20who%20only%20have%201%20failing%20grade...and%20leave%20those%20students%20with%202%20or%20more%20failing%20grades.%20The%20last%20name%20%26amp%3B%20first%20name%20fields%20will%20show%20the%20duplicate%20names%20and%20can%20be%20used%20as%20part%20of%20the%20criteria.%20Is%20there%20a%20way%20to%20automatically%20remove%2Fhide%20the%20students%20with%201%20failing%20grade%20(name%20appears%20once)%3F%20I%20look%20forward%20to%20your%20reply.%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1946991%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1947319%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20remove%20rows%20with%20single%20value%20(multiple%20value%20remains)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1947319%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F887921%22%20target%3D%22_blank%22%3E%40MsV213%3C%2FA%3E%26nbsp%3BI%20would%20suggest%20not%20to%20remove%20data%20but%20just%20filter%20out%20what%20you%20don't%20want%20to%20see.%20If%20you%20are%20on%20a%20recent%20Excel%20version%20it%20perhaps%20supports%20the%20UNIQUE%20and%20FILTER%20functions.%20If%20not%2C%20a%20Pivot%20Table%20could%20%26nbsp%3Bdo%20what%20you%20want.%20You'll%20find%20working%20examples%20for%20both%20in%20the%20attached%20workbook.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1948040%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20remove%20rows%20with%20single%20value%20(multiple%20value%20remains)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1948040%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYour%20multiple%20fail%20formula%20could%20be%20simplified%20by%20returning%20only%20the%20second%20occurrence%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3D%20FILTER(A2%3AA21%2CB2%3AB21%3D2)%20%3CEM%3E%E2%80%A0%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3Eor%2C%20as%20I%20would%20put%20it%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3D%20FILTER(fails%2C%20count%3D2)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWithout%20the%20dynamic%20array%20functions%2C%20life%20gets%20more%20complicated%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3D%20IFERROR(%20INDEX(%20fails%2C%20SMALL(%20IF(%20COUNTIFS(fails%2C%20fails%2C%20k%2C%22%26lt%3B%3D%22%26amp%3Bk)%3D2%2C%20k%20)%2C%20k%20)%20)%2C%20%22%22%20)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3Ewhere%20'k'%20is%20a%20unit%20based%20index%20column.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3E%E2%80%A0%20Aside%3A%20I've%20realised%20that%20it%20is%20so%20many%20years%20since%20I%20last%20used%20a%20relative%20reference%20that%20it%20came%20as%20a%20shock%20to%20me%20that%20copying%20and%20pasting%20a%20formula%20to%20a%20new%20location%20could%20give%20different%20results!%3C%2FEM%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1949280%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20remove%20rows%20with%20single%20value%20(multiple%20value%20remains)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1949280%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20pre-DA%20row%20number%20if%20only%20care%20about%20sorting%2C%20otherwise%20simple%20LOOKUP%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIFNA(LOOKUP(2%2C1%2F(%24B%242%3A%24B%2421%26gt%3B1)%2F(COUNTIF(%24E%241%3A%24E1%2C%24A%242%3A%24A%2421)%3D0)%2C%24A%242%3A%24A%2421)%2C%22%22)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor
Greetings!
I need to remove students who only have 1 failing grade...and leave those students with 2 or more failing grades. The last name & first name fields will show the duplicate names and can be used as part of the criteria. Is there a way to automatically remove/hide the students with 1 failing grade (name appears once)? I look forward to your reply.
4 Replies

@MsV213 I would suggest not to remove data but just filter out what you don't want to see. If you are on a recent Excel version it perhaps supports the UNIQUE and FILTER functions. If not, a Pivot Table could  do what you want. You'll find working examples for both in the attached workbook.

 

@Riny_van_Eekelen 

Your multiple fail formula could be simplified by returning only the second occurrence

= FILTER(A2:A21,B2:B21=2)

or, as I would put it 

= FILTER(fails, count=2)

 

Without the dynamic array functions, life gets more complicated

= IFERROR( INDEX( fails, SMALL( IF( COUNTIFS(fails, fails, k,"<="&k)=2, k ), k ) ), "" )

where 'k' is a unit based index column.

 

† Aside: I've realised that it is so many years since I last used a relative reference that it came as a shock to me that copying and pasting a formula to a new location could give different results!

@Peter Bartholomew 

In pre-DA row number if only care about sorting, otherwise simple LOOKUP

=IFNA(LOOKUP(2,1/($B$2:$B$21>1)/(COUNTIF($E$1:$E1,$A$2:$A$21)=0),$A$2:$A$21),"")

 

Brilliant!!! It's amazing how you overthink when you face a new challenge...but always good to be reminded of features to use in tough situations. Thanks so much for responding and providing the workbook to backup the tip you shared!!! I'm on my way!!!! I'm very grateful!!!