Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jim
 
Posts: n/a
Default Macro problem

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 3/16/2005 by jim
'

'
Range("B9").Select
Selection.Cut
Range("F8").Select
ActiveSheet.Paste
Range("F10").Select
End Sub


Hello
How do I get this macro to start where it stops?
I want it to cut cell B9 then paste it to cell F8 then move to cell F10,
this works over & over.
I need this macro to cut a cell then move up one row & to the right 4
columns and paste then move back to where it started then move down 2 rows.

Thank You
















  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

Jim

Try recording the macro with the "Relatiuve Reference" button enabled.

You will get different code like this.

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 3/16/2005 by Gord Dibben
'

'
ActiveCell.Offset(3, 3).Range("A1").Select
Selection.Cut
ActiveCell.Offset(0, 3).Range("A1").Select
ActiveSheet.Paste

End Sub

Note: you don't have to select things to work on them.

Range(Range("A1"), Range("A1").End(xlDown)).Select
Selection.Copy
Sheets("Sheet2").Select
Range("A1").Select
Selection.Paste

is equal to.....

Range(Range("A1"), Range("A1").End(xlDown)).Copy _
Destination:=Sheets("Sheet2").Range("A1")


Gord Dibben Excel MVP


On Wed, 16 Mar 2005 10:14:46 -0700, "Jim" wrote:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 3/16/2005 by jim
'

'
Range("B9").Select
Selection.Cut
Range("F8").Select
ActiveSheet.Paste
Range("F10").Select
End Sub


Hello
How do I get this macro to start where it stops?
I want it to cut cell B9 then paste it to cell F8 then move to cell F10,
this works over & over.
I need this macro to cut a cell then move up one row & to the right 4
columns and paste then move back to where it started then move down 2 rows.

Thank You
















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
Problem seting-up Regression Macro Confused VB Person Excel Discussion (Misc queries) 1 February 9th 05 08:05 AM
Circular Problem needs Macro NICK Excel Discussion (Misc queries) 2 February 1st 05 09:09 AM
Problem executing a macro from different workbook where it is Sergio Calleja Excel Discussion (Misc queries) 1 January 17th 05 12:38 PM
URGENT Mac/PC macro compatibility problem marika1981 Excel Discussion (Misc queries) 7 January 8th 05 12:43 AM
Macro Problem Kevin Excel Discussion (Misc queries) 1 December 9th 04 06:55 PM


All times are GMT +1. The time now is 11:48 AM.

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"