How to remove a set of records once the product is no longer in inventory

%3CLINGO-SUB%20id%3D%22lingo-sub-1612103%22%20slang%3D%22en-US%22%3EHow%20to%20remove%20a%20set%20of%20records%20once%20the%20product%20is%20no%20longer%20in%20inventory%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1612103%22%20slang%3D%22en-US%22%3E%3CP%3EGood%20Morning%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20I%20am%20wondering%20if%20there%20is%20a%20formula%20to%20delete%20all%20records%20of%20%22900068%22%20if%20it%20contains%20a%20%22Discard%20Weight%22%20as%20noted%20in%20the%20last%20row%20of%20the%20table%20in%20order%20to%20avoid%20having%20to%20manually%20delete%20hundreds%20of%20records%20for%20all%20Product%20ID%20numbers.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%20width%3D%22566%22%3E%3CTBODY%3E%3CTR%3E%3CTD%3E9000068%3C%2FTD%3E%3CTD%3EAatrexin%3C%2FTD%3E%3CTD%3E11%2F14%2F2019%2012%3A23%3C%2FTD%3E%3CTD%3E25.8%3C%2FTD%3E%3CTD%3EPre-Mix%20Weight%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E9000068%3C%2FTD%3E%3CTD%3EAatrexin%3C%2FTD%3E%3CTD%3E11%2F14%2F2019%2012%3A33%3C%2FTD%3E%3CTD%3E18.8%3C%2FTD%3E%3CTD%3EPost-Mix%20Weight%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E9000068%3C%2FTD%3E%3CTD%3EAatrexin%3C%2FTD%3E%3CTD%3E11%2F15%2F2019%208%3A58%3C%2FTD%3E%3CTD%3E18.8%3C%2FTD%3E%3CTD%3EPre-Mix%20Weight%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E9000068%3C%2FTD%3E%3CTD%3EAatrexin%3C%2FTD%3E%3CTD%3E11%2F15%2F2019%209%3A01%3C%2FTD%3E%3CTD%3E13.8%3C%2FTD%3E%3CTD%3EPost-Mix%20Weight%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E9000068%3C%2FTD%3E%3CTD%3EAatrexin%3C%2FTD%3E%3CTD%3E11%2F21%2F2019%2014%3A43%3C%2FTD%3E%3CTD%3E13.8%3C%2FTD%3E%3CTD%3EPre-Mix%20Weight%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E9000068%3C%2FTD%3E%3CTD%3EAatrexin%3C%2FTD%3E%3CTD%3E11%2F21%2F2019%2014%3A46%3C%2FTD%3E%3CTD%3E11.8%3C%2FTD%3E%3CTD%3EPost-Mix%20Weight%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E9000068%3C%2FTD%3E%3CTD%3EAatrexin%3C%2FTD%3E%3CTD%3E11%2F21%2F2019%2015%3A40%3C%2FTD%3E%3CTD%3E11.8%3C%2FTD%3E%3CTD%3EInitial%20Inventory%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E9000068%3C%2FTD%3E%3CTD%3EAatrexin%3C%2FTD%3E%3CTD%3E11%2F21%2F2019%2015%3A41%3C%2FTD%3E%3CTD%3E11.3%3C%2FTD%3E%3CTD%3EPost-Mix%20Weight%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E9000068%3C%2FTD%3E%3CTD%3EAatrexin%3C%2FTD%3E%3CTD%3E11%2F22%2F2019%209%3A12%3C%2FTD%3E%3CTD%3E11.3%3C%2FTD%3E%3CTD%3EPre-Mix%20Weight%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E9000068%3C%2FTD%3E%3CTD%3EAatrexin%3C%2FTD%3E%3CTD%3E11%2F22%2F2019%209%3A22%3C%2FTD%3E%3CTD%3E0.8%3C%2FTD%3E%3CTD%3EDiscard%20Weight%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1613261%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20remove%20a%20set%20of%20records%20once%20the%20product%20is%20no%20longer%20in%20inventory%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1613261%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F771057%22%20target%3D%22_blank%22%3E%40hjaten%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20you%20can%20use%20VBA%3C%2FP%3E%3CP%3Esimply%20apply%20a%20filter%20select%20the%20rows%20you%20need%20then%20delete%20them%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehere%20is%20my%20draft%20trial%2C%20please%20tweek%20it%20a%20bit%3C%2FP%3E%3CP%3Ebut%20it%20will%20work%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1629719%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20remove%20a%20set%20of%20records%20once%20the%20product%20is%20no%20longer%20in%20inventory%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1629719%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F746148%22%20target%3D%22_blank%22%3E%40Ramiz_Assaf%3C%2FA%3EThank%20you!%20I%20will%20give%20this%20a%20shot%20and%20see%20what%20happens.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Good Morning,

     I am wondering if there is a formula to delete all records of "900068" if it contains a "Discard Weight" as noted in the last row of the table in order to avoid having to manually delete hundreds of records for all Product ID numbers.

 

9000068Aatrexin11/14/2019 12:2325.8Pre-Mix Weight
9000068Aatrexin11/14/2019 12:3318.8Post-Mix Weight
9000068Aatrexin11/15/2019 8:5818.8Pre-Mix Weight
9000068Aatrexin11/15/2019 9:0113.8Post-Mix Weight
9000068Aatrexin11/21/2019 14:4313.8Pre-Mix Weight
9000068Aatrexin11/21/2019 14:4611.8Post-Mix Weight
9000068Aatrexin11/21/2019 15:4011.8Initial Inventory
9000068Aatrexin11/21/2019 15:4111.3Post-Mix Weight
9000068Aatrexin11/22/2019 9:1211.3Pre-Mix Weight
9000068Aatrexin11/22/2019 9:220.8Discard Weight
2 Replies

@hjaten 

 

I think you can use VBA

simply apply a filter select the rows you need then delete them

 

here is my draft trial, please tweek it a bit

but it will work

@Ramiz_AssafThank you! I will give this a shot and see what happens.