Thread: Moveing Rows
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default Moveing Rows

Hi

Try this:


Sub AAA()
Dim MyArr As Variant
Dim MyRange As Range

Set MyRange = Range("A1:A5")
MyArr = Array(MyRange.Value)
counter = UBound(MyArr(0))
For Each cell In MyRange
cell.Value = MyArr(0)(counter, 1)
counter = counter - 1
Next
End Sub

Regards,
Per

On 22 Feb., 16:08, ytayta555 wrote:
Hi all , and a good day

I *still have a problem . I need to move the content of rows ,
in the next order :
Rows :

A1 -
A2 -
A3 -
A4 -
A5 -

to became :

A1 = A5
A2 = A4
A3 = A3
A4 = A2
A5 = A1