Remove selected data from a list
i have a list of sequential numbers eg 1 to 100.
I have a second list of numbers eg 5,6,23,38,90 I want to remove the numbers in the second list from the first list. Leaving me a list of numbers 1 to 100 minus the 5 numbers in the second list. |
Remove selected data from a list
Excel 2007 Table
Filter out selected numbers Advanced Filter http://c0718892.cdn.cloudfiles.racks...03_23_10a.xlsx http://www.mediafire.com/file/zzoygidnmzg/03_23_10a.pdf |
Remove selected data from a list
This macro will do what you want. I assumed your 100 numbers are in Column
A, starting in A2, and your search numbers are in Column B starting in B2. Post back if you need more. HTH Otto Sub RemoveSome() Dim rColA As Range Dim rColB As Range Dim i As Range Set rColA = Range("A2", Range("A" & Rows.Count).End(xlUp)) Set rColB = Range("B2", Range("B" & Rows.Count).End(xlUp)) For Each i In rColB If Not rColA.Find(What:=i, LookAt:=xlWhole) Is Nothing Then rColA.Find(What:=i, LookAt:=xlWhole).Delete Shift:=xlUp End If Next i End Sub "kingie" wrote in message ... i have a list of sequential numbers eg 1 to 100. I have a second list of numbers eg 5,6,23,38,90 I want to remove the numbers in the second list from the first list. Leaving me a list of numbers 1 to 100 minus the 5 numbers in the second list. |
All times are GMT +1. The time now is 06:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com