LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Macro/VBA to loop through list of values and output row- Help

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
create loop in macro for a list VAMS Excel Programming 3 June 19th 08 10:31 PM
Help - Loop Function Giving Incorrect Output Jenny Marlow Excel Programming 4 April 25th 08 07:40 PM
Need Help With My Loop That Creates Output File Jenny Marlow Excel Programming 5 April 24th 08 11:42 PM
Need Help With Loop That Creates Output File Jenny Marlow Excel Discussion (Misc queries) 0 April 23rd 08 11:23 PM
Using a Loop Statement to Pass Data between WKS and Output File Belzeddar Excel Programming 2 January 14th 04 07:40 AM


All times are GMT +1. The time now is 06:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"