moving data from numerous colums into one colum

T

teresa

Hi,

I have to move the data from numerous columns into one colum as a list,
how can i do this?

eg
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10

to
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10

please help?

thanks,
 
T

teresa

ACTUALLY THE DATA SHOULD READ,

1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10

NOT AS PREVIOUS STATED

THANKS,

TERESA
 
I

Infinitogool

Hi teresa
data: A1:J10

Try this formula in cell A11
=OFFSET($A$1,INT((ROW()-11)/10),MOD(ROW()-1,10))
Copy down as far as needed

Regards,
Pedro J.
 
T

teresa

HI THIS WORKS, BUT IF U CHECK MY SECOND NOTE, THE INFORMATION SHOULD READ THE
OTHER WAY,

THANKS,

TERESA
 
G

Gaijintendo

If you copy the cells that this technique gives you, "Paste Special" them on
top as values, you can then sort them as you see fit. Just make sure you
don't need to reference the original cells.
 
J

John C

Another way, using above example that your data is in A1:J10, assuming all
data are numbers! (and all cells are occupied).
in A11, type the formula: =SMALL($A$1:$J$10,ROW()-10), and copy down as
needed.
 
D

Don Guillett

Sub transposerowstocola()
lr = Cells(rows.Count, 1).End(xlUp).Row
For i = 1 To lr
lc = Cells(i, Columns.Count).End(xlToLeft).Column
dlr = Cells(rows.Count, 1).End(xlUp).Row + 1
Range(Cells(i, 1), Cells(i, lc)).Copy
Cells(dlr, 1).PasteSpecial Paste:=xlPasteAll, Transpose:=True
Next i
rows("1:" & lr).Delete
End Sub
 
D

Don Guillett

Based on your CHANGE. Why can't women make up their minds <G>
From a recent and similar posting

Sub copyallcolstocolA()
For i = 2 To Cells(1, Columns.Count).End(xlToLeft).Column
cl = Cells(rows.Count, i).End(xlUp).Row
dlr = Cells(rows.Count, 1).End(xlUp).Row + 1
Range(Cells(1, i), Cells(cl, i)).Copy Cells(dlr, 1)
Next i
End Sub
 
J

John C

Then you would want to use Infinitogool's suggestion for offset. Copy and
paste special as suggested per Gaijintendo, then sort.
 
J

John C

Formula solutions have been given. Some people aren't comfortable with
macros, or VBA for that matter. To say that your way is the 'proper' way, and
that other ways are subsequently improper is both arrogant and pompous. The
macro way is typically cleaner, but if it is a one time rearrangement, for
someone to go through all the learning of macros, and operation thereof I
think is a bit much.
 
I

Infinitogool

Hi teresa
data: A1:J10

Try this formula in cell A11
=OFFSET($A$1,MOD(ROW()-1,10),INT((ROW()-11)/10))
Copy down as far as needed

Regards,
Pedro J.
 
J

John C

No. If you have been using excel for long, which I am assuming you have, then
you should be the first to know that there are MANY ways to achieve the same
result. Just because you use a macro, does not make it the 'proper' way.
 
T

teresa

Guys no need to argue,

i got it sorted,

Ive another problem if anyone would like to help with that?

thanks,

teresa
 
D

Don Guillett

Because I am pompous and arrogant, I say that it IS the proper way IN THIS
CASE. I think it absolutely silly to burden a project with unnecessary
calculations and other formula overhead. Of course, the formula solution
could be used but the results should then be converted to values.
 
J

John C

As has been stated by several posters. Of course, you obviously didn't read
them, or you would have noted that already.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top