ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to arrange multiple cell value into single column (https://www.excelbanter.com/excel-programming/389709-how-arrange-multiple-cell-value-into-single-column.html)

geniusideas

How to arrange multiple cell value into single column
 
For Example:
Before
A B C D
1 Button1 Button2
2 Button3 Button4
3 Button5 Button6
Button7

After
A
1 Button1
2 Button2
3 Button3
4 Button4
5 Button5
6 Button6
7 Button7

Pls help in VBA code how to do?


Sebation.G[_2_]

How to arrange multiple cell value into single column
 
try:
Sub test()
Dim mycell As Range
Dim k As ingeter
Application.ScreenUpdating = False
On Error GoTo handle:
For Each mycell In ActiveSheet.UsedRange
If Not IsEmpty(mycell) Then
k = k + 1
mycell.Copy Cells(k, 5)
End If
Next mycell
handle:
Application.ScreenUpdating = True
End Sub

--
Regards,

Sebation.G
"geniusideas"
groups.com...
For Example:
Before
A B C D
1 Button1 Button2
2 Button3 Button4
3 Button5 Button6
Button7

After
A
1 Button1
2 Button2
3 Button3
4 Button4
5 Button5
6 Button6
7 Button7

Pls help in VBA code how to do?




Sebation.G[_2_]

How to arrange multiple cell value into single column
 
sorry ,write a wrong word
Dim k As ingeter
shd change
Dim k as integer
"geniusideas"
groups.com...
For Example:
Before
A B C D
1 Button1 Button2
2 Button3 Button4
3 Button5 Button6
Button7

After
A
1 Button1
2 Button2
3 Button3
4 Button4
5 Button5
6 Button6
7 Button7

Pls help in VBA code how to do?





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com