LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default looping macros

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
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
Help with Looping Macros Chaitanya Excel Worksheet Functions 0 December 24th 10 06:01 AM
Looping Macros that change Dar Excel Discussion (Misc queries) 1 February 25th 10 10:09 PM
Calling macros, looping function? Can this code be written more efficiently? Punsterr Excel Programming 4 October 7th 05 07:16 PM
Help needed - seriously (looping? macros? formulas?) jarski Excel Programming 4 June 29th 05 05:44 PM
Looping macros using VB code accessuser1308 Excel Discussion (Misc queries) 2 March 9th 05 11:11 PM


All times are GMT +1. The time now is 12:38 PM.

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"