Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Using a macro to make a list from results

Hi,

I have made a macro that runs another macro and copies the results to a new
column thus creating a list. I want to make the macro run over a large
number of cycles and create a large list without me having to type in the
same command over and over. How can I do this? I have pasted the macro below:

Sub Macro8()
'
' Macro8 Macro
' Macro recorded 2/06/2008 by deemo
'

'
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N8").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O8").Select
ActiveSheet.Paste
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N9").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O9").Select
ActiveSheet.Paste
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N10").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O10").Select
ActiveSheet.Paste
End Sub

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Using a macro to make a list from results

On Jun 2, 7:04*am, deemo85 wrote:
Hi,

I have made a macro that runs another macro and copies the results to a new
column thus creating a list. I want to make the macro run over a large
number of cycles and create a large list without me having to type in the
same command over and over. How can I do this? I have pasted the macro below:

Sub Macro8()
'
' Macro8 Macro
' Macro recorded 2/06/2008 by deemo
'

'
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N8").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O8").Select
ActiveSheet.Paste
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N9").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O9").Select
ActiveSheet.Paste
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N10").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O10").Select
ActiveSheet.Paste
End Sub

Thanks!


No need for all those selects. Put your calls back in, and make the
necessary range changes.

Sub this()
Range("B1").Copy Destination:=Range("N8:N45")
Range("F1").Copy Destination:=Range("O8:O45")
End Sub
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Using a macro to make a list from results

thanks! I am also having my macro run my other macro called iterate2, then
copy the results produced from that in the cells B1 and F1 to N8 and O8, and
then run iterate2 again, copy the results from cells B1and F1 to N9 and O9,
and continue doing this for a number of times, could you suggest how I can do
that incorporate the running of my other macro, I have done it in the macro
pasted below but only 3 times because I didnt know how to run it multiple
times.

cheers

"JW" wrote:

On Jun 2, 7:04 am, deemo85 wrote:
Hi,

I have made a macro that runs another macro and copies the results to a new
column thus creating a list. I want to make the macro run over a large
number of cycles and create a large list without me having to type in the
same command over and over. How can I do this? I have pasted the macro below:

Sub Macro8()
'
' Macro8 Macro
' Macro recorded 2/06/2008 by deemo
'

'
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N8").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O8").Select
ActiveSheet.Paste
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N9").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O9").Select
ActiveSheet.Paste
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N10").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O10").Select
ActiveSheet.Paste
End Sub

Thanks!


No need for all those selects. Put your calls back in, and make the
necessary range changes.

Sub this()
Range("B1").Copy Destination:=Range("N8:N45")
Range("F1").Copy Destination:=Range("O8:O45")
End Sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Using a macro to make a list from results

On Jun 2, 8:39*am, deemo85 wrote:
thanks! I am also having my macro run my other macro called iterate2, then
copy the results produced from that in the cells B1 and F1 to N8 and O8, and
then run iterate2 again, copy the results from cells B1and F1 to N9 and O9,
and continue doing this for a number of times, could you suggest how I can do
that incorporate the running of my other macro, I have done it in the macro
pasted below but only 3 times because I didnt know how to run it multiple
times.

cheers



"JW" wrote:
On Jun 2, 7:04 am, deemo85 wrote:
Hi,


I have made a macro that runs another macro and copies the results to a new
column thus creating a list. I want to make the macro run over a large
number of cycles and create a large list without me having to type in the
same command over and over. How can I do this? I have pasted the macro below:


Sub Macro8()
'
' Macro8 Macro
' Macro recorded 2/06/2008 by deemo
'


'
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N8").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O8").Select
ActiveSheet.Paste
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N9").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O9").Select
ActiveSheet.Paste
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N10").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O10").Select
ActiveSheet.Paste
End Sub


Thanks!


No need for all those selects. *Put your calls back in, and make the
necessary range changes.


Sub this()
* * Range("B1").Copy Destination:=Range("N8:N45")
* * Range("F1").Copy Destination:=Range("O8:O45")
End Sub- Hide quoted text -


- Show quoted text -


Yeah, that's my fault. Didn't read you code thoroughly enough. Sorry
about that.

Tweak as needed.
Sub likeThis()
Dim i As Long
For i = 8 To 45
Application.Run "Iterate2"
Range("B1").Copy _
Destination:=Range("N" & i)
Range("F1").Copy _
Destination:=Range("O" & i)
Next i
End Sub
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Using a macro to make a list from results

works perfectly! thanks a million!

"JW" wrote:

On Jun 2, 8:39 am, deemo85 wrote:
thanks! I am also having my macro run my other macro called iterate2, then
copy the results produced from that in the cells B1 and F1 to N8 and O8, and
then run iterate2 again, copy the results from cells B1and F1 to N9 and O9,
and continue doing this for a number of times, could you suggest how I can do
that incorporate the running of my other macro, I have done it in the macro
pasted below but only 3 times because I didnt know how to run it multiple
times.

cheers



"JW" wrote:
On Jun 2, 7:04 am, deemo85 wrote:
Hi,


I have made a macro that runs another macro and copies the results to a new
column thus creating a list. I want to make the macro run over a large
number of cycles and create a large list without me having to type in the
same command over and over. How can I do this? I have pasted the macro below:


Sub Macro8()
'
' Macro8 Macro
' Macro recorded 2/06/2008 by deemo
'


'
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N8").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O8").Select
ActiveSheet.Paste
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N9").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O9").Select
ActiveSheet.Paste
Application.Run "Iterate2"
Range("B1").Select
Selection.Copy
Range("N10").Select
ActiveSheet.Paste
Range("F1").Select
Selection.Copy
Range("O10").Select
ActiveSheet.Paste
End Sub


Thanks!


No need for all those selects. Put your calls back in, and make the
necessary range changes.


Sub this()
Range("B1").Copy Destination:=Range("N8:N45")
Range("F1").Copy Destination:=Range("O8:O45")
End Sub- Hide quoted text -


- Show quoted text -


Yeah, that's my fault. Didn't read you code thoroughly enough. Sorry
about that.

Tweak as needed.
Sub likeThis()
Dim i As Long
For i = 8 To 45
Application.Run "Iterate2"
Range("B1").Copy _
Destination:=Range("N" & i)
Range("F1").Copy _
Destination:=Range("O" & i)
Next i
End Sub



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
Macro to list report results GeorgeA Excel Discussion (Misc queries) 3 June 24th 09 03:21 PM
Using a macro to make a list from results deemo85 Excel Discussion (Misc queries) 1 June 2nd 08 02:43 PM
Using a macro to make a list from Results deemo85 New Users to Excel 1 June 2nd 08 02:01 PM
Using a Macro to make a list from results deemo85 Excel Discussion (Misc queries) 0 June 2nd 08 12:03 PM
How can I list the results of my macro without overwritng previous results? mattip Excel Programming 3 November 28th 03 03:45 AM


All times are GMT +1. The time now is 04:41 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"