View Single Post
  #2   Report Post  
bj
 
Posts: n/a
Default

I am not real sure of the pattern you are trying to develop
A2:A5 to B1:E1
is not really the same pattern as
A8:A11 to A7:D7

The macro you have is definately absolutes only.

If what you want to do is A2:A5 to B1:E1
A8:A11 to B7:E7 and Next series A14:A17to B13:E13

Then in fyour macro something like

for rr = 1 to 61 step 6
for cc = 1 to 4
cells(rr,1+cc)=cells(rr+cc,1)
next cc
next rr

You will have ot play with it if you want a different pattern.

"Scratching my Head" wrote:

I am trying to move 4 cells within one column to 4 cells within one row, ie:
A2, A3, A4, A5 to B1, C1, D1, E1 by using a macro. I want to repeat the macro
then on cells A8, A9, A10, A11 moving them to rows A7, B7, C7, D7, etc. See
the pattern? IE I am converting data in a column to data in rows. The first 3
different files I tried this on, relative cell position worked great. Then
all of a sudden on the next file (and every file since) the macro always runs
as if it is using absolute cell references. No matter what cell on the sheet
I start the macro from, it always go back and tries the use A2,3,4,5 and move
it to B1, C1, D1, E1. It worked in the beginning but now it doesn't. Can
anyone Help????
Thanks

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 5/30/05 by new
'
' Keyboard Shortcut: Ctrl+m
'
Selection.Cut
Range("B1").Select
ActiveSheet.Paste
Range("A3").Select
Selection.Cut
Range("C1").Select
ActiveSheet.Paste
Range("A4").Select
Selection.Cut
Range("D1").Select
ActiveSheet.Paste
Range("A5").Select
Selection.Cut
Range("E1").Select
ActiveSheet.Paste
Range("A8").Select
End Sub