LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default move multiple columns into single set of columns

You have to do it with a very simple macro

Sub test()

Lastrow = Rows.Count

For RowCount = 1 To Lastrow

Set firstcell = Cells(RowCount, "E"). _
End(xlToRight)

If Not IsEmpty(firstcell) Then
Set cutrange = Range(firstcell, _
firstcell.Offset(rowoffset:=0, _
columnoffset:=3))
cutrange.Cut _
Destination:=Range("A" & RowCount)
End If

Next RowCount

End Sub


"mrg9999" wrote:

Excel move multiple columns into single set of column
How can I automate this
I have a huge sheet

A B C D E F G H I --- ZZ
R1
R2
R3
RN

and I want to move every block of 4 columns(or n cols) to sit under A -D

so

R1 A B C D
R2
R3
R4
R5 E F G H
R6
R7
R8
R9
R10 I J K L

etc

 
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
How do I convert multiple columns to a single column? scottflinders Excel Discussion (Misc queries) 5 November 12th 06 02:13 PM
Single column into multiple columns Heidi Excel Discussion (Misc queries) 3 November 1st 06 09:27 PM
Multiple Columns to Single Columns [email protected] Excel Discussion (Misc queries) 3 September 7th 06 05:33 AM
.csv file Multiple columns of data in single Cell Bin Excel Discussion (Misc queries) 1 March 29th 06 08:48 PM
Sum Count of Single Criteria in Multiple Non-Adjacent columns Sam via OfficeKB.com Excel Worksheet Functions 9 July 14th 05 10:01 PM


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