Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Moveing Rows

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Moveing Rows

On 22 feb., 17:42, Per Jessen wrote:

It don't remove entire row , but it work very
well for me .

Thank you very much , have a good evening
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Moveing Rows

In B1 enter =INDEX($A$1:$A$5,5-(ROW(A1)-1))


Gord Dibben MS Excel MVP


On Mon, 22 Feb 2010 07:08:54 -0800 (PST), 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Moveing Rows

On 22 feb., 19:15, Gord Dibben <gorddibbATshawDOTca wrote:

Thank you , Gord . Is useful for me
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
compare two files and merge rows base on a matching word within thesetwo rows mshak Excel Programming 1 December 9th 09 01:34 AM
"Add/Remove Rows Code" adds rows on grouped sheets, but won't remove rows. Conan Kelly Excel Programming 1 November 16th 07 10:41 PM
Excell data moveing Muddled Excel Discussion (Misc queries) 0 May 22nd 07 01:49 AM
Moveing Data to another Worksheet Alan Excel Worksheet Functions 2 September 8th 05 11:46 PM
moveing values with macros carlos1973 Excel Programming 0 July 5th 04 09:05 AM


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