#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 361
Default Macro Question

I am using this:


Sub Macro8()
Range("G6").Select
Selection.Copy
ActiveCell.Offset(-4, -6).Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Run "checktrades.xls!Macro2"
Range("A2:B2").Select
Selection.Copy
ActiveCell.Offset(2, 0).Range("A1").Select
Selection.End(xlToRight).Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
End Sub

I have a list in G6:G10 and was wondoring if this part of the macro -

Range("G6").Select
Selection.Copy

Can it be modified to start with G6 and progress thru the list to G10.

Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default Macro Question

You could do the following:

For i = 6 to 10
Range("G" & i ).Select
Next i

Include whatever functionality you want withint the FOR NEXT loop.

"carl" wrote:

I am using this:


Sub Macro8()
Range("G6").Select
Selection.Copy
ActiveCell.Offset(-4, -6).Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Run "checktrades.xls!Macro2"
Range("A2:B2").Select
Selection.Copy
ActiveCell.Offset(2, 0).Range("A1").Select
Selection.End(xlToRight).Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
End Sub

I have a list in G6:G10 and was wondoring if this part of the macro -

Range("G6").Select
Selection.Copy

Can it be modified to start with G6 and progress thru the list to G10.

Thank you in advance.

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 Question sony654 Excel Worksheet Functions 3 February 27th 06 09:55 PM
Macro question Terry Bennett Excel Worksheet Functions 9 January 22nd 06 10:39 PM
Excel Macro Question billrl34 Excel Worksheet Functions 1 December 19th 05 10:38 PM
using a macro question revisited Adam Kroger Excel Discussion (Misc queries) 4 December 16th 05 03:37 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM


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