ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Convert row data to Column data... (https://www.excelbanter.com/excel-programming/282068-convert-row-data-column-data.html)

Randy Lefferts

Convert row data to Column data...
 
I have data in a range A1:Z1. I want to copy this data to
a column, A2:A27. Suggestions or help is most
appreciated! Thank you for your time.

Randy

GSS[_2_]

Convert row data to Column data...
 

Click macro record: copy the range--paste special--
transpose.
Then see what the macro recorded.


-----Original Message-----
I have data in a range A1:Z1. I want to copy this data to
a column, A2:A27. Suggestions or help is most
appreciated! Thank you for your time.

Randy
.


Dianne

Convert row data to Column data...
 
Sub TransposeRange()
With ActiveSheet
.Range("A1:Z1").Copy
.Range("A2").PasteSpecial Transpose:=True
End With
Application.CutCopyMode = False
End Sub

--
HTH,
Dianne

In ,
Randy Lefferts typed:
I have data in a range A1:Z1. I want to copy this data to
a column, A2:A27. Suggestions or help is most
appreciated! Thank you for your time.

Randy




Tom Ogilvy

Convert row data to Column data...
 
The macro recorder with a manual copy , pastespecial transpose is a good
recommendation - here is another if it fits your requirements.

Range("A2:A27").Value=Application.Transpose(Range( "A1:Z1"))

If you don't need formats and the cells contain constants or you don't want
constants not formulas.

--
Regards,
Tom Ogilvy

"Randy Lefferts" wrote in message
...
I have data in a range A1:Z1. I want to copy this data to
a column, A2:A27. Suggestions or help is most
appreciated! Thank you for your time.

Randy




Randy Lefferts

GSS, Diane, Tom....Thank you !
 
Thank you, this will work great!

Drewski[_2_]

Convert row data to Column data...
 

Tom Ogilvy wrote:
[b]The macro recorder with a manual copy , pastespecial transpose is
a good
recommendation - here is another if it fits your requirements.

Range("A2:A27").Value=Application.Transpose(Range( "A1:Z1"))

If you don't need formats and the cells contain constants or you
don't want
constants not formulas.

--
Regards,
Tom Ogilvy

This works fine if you're only transposing one column of data. What
if it's a column of repeating data to convert into multiple columns?

name1
address1
phone#1
name2
address2
phone#2
name3
address3
phone#3
etc.... for the next few hundred rows to be converted to

name1 address1 phone#1
name2 address2........



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/



All times are GMT +1. The time now is 01:57 PM.

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