Pasteing


Posted by DAvid on June 15, 2000 3:21 AM

I have a work book that has about 100 values in ten rows of ten and I would like to use this as a form to input
Each cell into the next empty column on another worksheet but in 1 row 100 columns long

so if my sheet were 3 *3 with these number
1 5 9
56 8 14
k 5 7

i would like on the next empty row on another sheet to list them in order
1 5 9 56 8 14 k 5 7

except with 10*10



Posted by Ryan on June 16, 0100 3:14 PM

To use this macro, make your selection first, then execute the macro. I tried it a couple
' of times and it worked good. It will only work obviously with 256 cells, b/c that's how many columns there are. Hope you like it. Let me know.
' Ryan

Sub TenbyTen()

Dim x As Integer
Dim i As Integer
Dim Entry() As Variant


Application.ScreenUpdating = False

If TypeName(Selection) <> "Range" Then Exit Sub

CellCount = Selection.Count
ReDim Entry(1 To CellCount)

x = 0
For Each cell In Selection
x = x + 1
Entry(x) = cell.Value
Next cell

Workbooks.Add

For i = 1 To CellCount
Cells(1, i).Value = Entry(i)
Next i
Application.ScreenUpdating = True

End Sub