#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Marco

How does one repeat a recorded macro!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 772
Default Marco

what do you mean by repeat? You just play it from the command bar with the
run button beside the record button you used to record it. If this is not
what you mean please specify
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Puzzled" wrote:

How does one repeat a recorded macro!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Marco

John,

Please refer to "Repeat a recorded macro" below.

I need to munipulate 3 rows of data into 1 and then repeat the process for
some 1500 records. The records are standard in their format.

"John Bundy" wrote:

what do you mean by repeat? You just play it from the command bar with the
run button beside the record button you used to record it. If this is not
what you mean please specify
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Puzzled" wrote:

How does one repeat a recorded macro!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Marco

You modify the code so that it is index based, not absolute, then ssetup a
loopp to manage it.

Say the recorder gave

Range("A2").Select
Selection.Value = 22
Range("B2").Select
Selection.Value = "Red"
Range("B2").Select
Selection.Value = "I dunno now"

first tidy it up

Range("A2").Value = 22
Range("B2").Value = "Red"
Range("B2").Value = "I dunno now"

then base it around one cell

With Range("A2")
.Value = 22
.Offset(0,1).Value = "Red" '1 column right
.Offset(0,2).Value = "I dunno now" '2 columns
End With

then put it in a loop

For i = 2 To 2
With Range("A" & i)
.Value = 22
.Offset(0,1).Value = "Red" '1 column right
.Offset(0,2).Value = "I dunno now" '2 columns
End With
Next i

then make the loop bigger

For i = 2 To 1500
With Range("A" & i)
.Value = 22
.Offset(0,1).Value = "Red" '1 column right
.Offset(0,2).Value = "I dunno now" '2 columns
End With
Next i



--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Puzzled" wrote in message
...
How does one repeat a recorded macro!



Reply
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
Marco Help looper Excel Discussion (Misc queries) 2 May 12th 07 06:55 PM
marco to format top 80% NN Excel Discussion (Misc queries) 3 January 17th 06 05:51 PM
I need some help with a Marco xgunda420x Excel Discussion (Misc queries) 2 August 2nd 05 01:43 PM
Exporting a Marco Lance Gray Excel Discussion (Misc queries) 1 January 5th 05 08:52 PM
Marco Loi New Users to Excel 4 December 7th 04 08:52 PM


All times are GMT +1. The time now is 01:36 PM.

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

About Us

"It's about Microsoft Excel"