Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Carl Jarvis
 
Posts: n/a
Default Copy / Paste - Kind of Transpose

Hello Group, I wonder if you can help me.

I have a load of data in Column A, spearated by a space, for example...

1
2
3
4

1
2
3

1
2
3
4
5

1
2
3
4

I want to bring it all toghether so that it looks like this...

1111
2222
3333
4 44
5

Do you know a way to do this? Maybe using the empty row as the divide /
break?

Many thanks to those who help.

Carl.


  #2   Report Post  
Mel Arquiza
 
Posts: n/a
Default

Hi Carl,

Try this code below.

Sub Macro1()
Dim x As Integer
Dim y As Integer
Dim z As Integer

For x = 1 To 4
Range("A" & x).Select
ActiveCell.FormulaR1C1 = x
Next x

For y = 6 To 9
Range("A" & y).Select
ActiveCell.FormulaR1C1 = y - 5
Next y

For z = 11 To 14
Range("A" & z).Select
ActiveCell.FormulaR1C1 = z - 10
Next z

End Sub

Sub Macro2()

Dim t As Integer
Dim s1 As Integer
Dim s2 As Integer
Dim s3 As Integer

For s1 = 6 To 15 Step 5
Range("A" & s1).Select
Selection.Cut
For t = 2 To 3
Cells(1, t).Select
Next t
ActiveSheet.Paste
Next s1

For s2 = 7 To 16 Step 5
Range("A" & s2).Select
Selection.Cut
For t = 2 To 3
Cells(2, t).Select
Next t
ActiveSheet.Paste
Next s2

For s3 = 8 To 17 Step 5
Range("A" & s3).Select
Selection.Cut
For t = 2 To 3
Cells(3, t).Select
Next t
ActiveSheet.Paste
Next s3

For s4 = 9 To 18 Step 5
Range("A" & s4).Select
Selection.Cut
For t = 2 To 3
Cells(4, t).Select
Next t
ActiveSheet.Paste
Next s4
End Sub


"Carl Jarvis" wrote:

Hello Group, I wonder if you can help me.

I have a load of data in Column A, spearated by a space, for example...

1
2
3
4

1
2
3

1
2
3
4
5

1
2
3
4

I want to bring it all toghether so that it looks like this...

1111
2222
3333
4 44
5

Do you know a way to do this? Maybe using the empty row as the divide /
break?

Many thanks to those who help.

Carl.



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
copy paste is not working Becky1810 Excel Discussion (Misc queries) 1 July 16th 05 02:12 PM
Issue with copy & paste? Etrnal168 Excel Discussion (Misc queries) 2 July 12th 05 03:35 AM
copy and paste He4Giv Excel Discussion (Misc queries) 3 June 23rd 05 12:27 AM
How do I copy an outline w/ subtotals & paste just the subtotals av Excel Discussion (Misc queries) 1 June 20th 05 11:35 PM
how do I transpose and paste a link in excel JJJ Excel Worksheet Functions 4 April 27th 05 02:32 PM


All times are GMT +1. The time now is 06:12 PM.

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"