Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

In EXCEL, how to put the column dat

Status
Not open for further replies.

wuwang

Programmer
May 16, 2001
48
US
In EXCEL, how to put the column data to row data?
For example, I want to show the field from
COLUMN A
k1
k2
k3
k4
k5
col1 col2 col3 col4 col5
to k1, k2, k3 , k4, k5

I'm not familiar with EXCEL. Could you help me with that?
Thank you
 
Highlight the range and select copy.
Go to the upper left cell of the new range and press
Edit+PasteSpecial+Transpose

 
Very appreciate your help. One more question -- how to
put the , in between the data. Usually I have more than 3000 records need to handle.
Thanks again.
 
3000 records ?

3000 records transposed will not fit into a spreadsheet limited by 256 columns.

However, setting that problem aside, add a "," before or after the transpose, whichever is easier. (I prefer before)

Before :
In cell B2, =A2&","
Copy to all records in column, then transpose column B

After :
In cell A3, =A2&","
Copy to all columns

You may need to Copy+PasteSpecial+Values to remove formulas, depending on what you will do with the data later.

Hope this helps.
 
Your are great. It works very well.
Another thought just comes out. If I put it in a Macro
then I don't need to re-do it again and again.

Is it possible? if Yes, How?
Hope you don't mind I have so many questions.

Thank you
 
Sure can. But try this.

With a clean spreadsheet, only containing vertical data prior to the transpose, position the active cell on the upper left corner of your data, press the "End" and then the "Home" keys. Now press Ctrl+C to copy.

Now select Edit PasteSpecial Transpose.

It's really only a few keystrokes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top