Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am creating an Excel spreadsheet called "Bartow550" which lists all clients
at or above an allotment level of 550. In conjunction with this, I have imported an allotment report into Excel and I call this spreadsheet "BartowAllotments". I have figured out a macro to find the first client who has an allotment level of 550, copy that client's information, and paste it into the "Bartow550" report. Below is my macro: Sub GetBartow550() ' ' GetBartow550 Macro ' Macro recorded 7/9/2009 by dhruser ' ' Windows("BartowAllotments.xls").Activate Range("A1").Select Cells.Find(What:="550", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _ , SearchFormat:=False).Activate Selection.Offset(0, -4).Range("A1:F1").Select Application.CutCopyMode = False Selection.Copy Windows("Bartow550.xls").Activate Range("A1").Select ActiveCell.Offset(rowOffset:=2, columnOffset:=0).Activate Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub The problem is that there are several clients who are at or above the 550 allotment level, and I want to paste all of those clients and their information into the "Bartow550" report. How do I loop through the macro to find the next client and paste the information in my "Bartow550" spreadsheet? I have looked up Help entries for the Do...Loop and the For...Next loops, but I can't find any examples that I can understand (I am a beginner using macros). Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with Looping Macros | Excel Worksheet Functions | |||
Looping Macros that change | Excel Discussion (Misc queries) | |||
Calling macros, looping function? Can this code be written more efficiently? | Excel Programming | |||
Help needed - seriously (looping? macros? formulas?) | Excel Programming | |||
Looping macros using VB code | Excel Discussion (Misc queries) |