Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, i have the code below supplied by Tom Ogilvy. What i would like to
do is look up the range 2 and all instances in range 1 delete entire row, then move one cell down in range 2 compare to range 1 & delete all rows again etc... Sub ABC() Dim sh1 as worksheet, sh2 as worksheet Dim rng1 as Range, rng2 as Range Dim rw as Long, cell as Range set sh1 = worksheets("Tabelle1") set sh2 = worksheets("Temp") rw = 2 set rng1 = sh1.Range(sh1.Cells(2,1),sh1.Cells(2,1).End(xldown )) set rng2 = sh2.Range(sh2.Cells(2,1),sh2.Cells(2,1).End(xldown )) for each cell in rng1 if application.countif(rng2,cell.value) = 0 then cell.EntireRow.copy sh3.cells(rw,1) rw = rw + 1 end if Next End sub Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
filter and delete | Excel Discussion (Misc queries) | |||
Filter and Delete | Excel Worksheet Functions | |||
AFTER 8 SEC ON SPACEBAR I GOT A FILTER?DELETE IT? | Excel Discussion (Misc queries) | |||
Filter list and delete | Excel Discussion (Misc queries) | |||
filter and delete | Excel Worksheet Functions |