Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
create the helper column showing the closest agencies per the above -
then filter the helper column and copy/paste the visible rows to another blank sheet. obviously change the range and Field:=# to reflect your helper column. Sub FilterCopy() Dim FilterRange As Range Dim CopyRange As Range Set FilterRange = Range("A1:A100") 'Header in row Set CopyRange = Range("A2:A100") FilterRange.AutoFilter Field:=1, Criteria1:=1 CopyRange.SpecialCells(xlCellTypeVisible).Copy _ Destination:=Worksheets("Sheet2").Range("A2") Application.CutCopyMode=False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
create loop in macro for a list | Excel Programming | |||
Help - Loop Function Giving Incorrect Output | Excel Programming | |||
Need Help With My Loop That Creates Output File | Excel Programming | |||
Need Help With Loop That Creates Output File | Excel Discussion (Misc queries) | |||
Using a Loop Statement to Pass Data between WKS and Output File | Excel Programming |