transforming column data to rows on a new worksheet

dbsa

New Member
Joined
Feb 15, 2010
Messages
1
Hi
I have a spreadsheet as follows:
Col A: phone number
Col B: text msg.

So data might look like:
Col A.......Col B
99998888 Good Morning Robert
77776666 Greetings Mary

I want to create a single-column text file which would present the above data as:
99998888
Good Morning Robert
77776666
Greetings Mary

So I'm looking at creating a second Worksheet with formulas in cells to copy across the data into a single column for saving as text.

Any help would be most appreciated,
James
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi,

Try... (drag down the formula in E1 as required)
Excel Workbook
ABCDE
18887Good Morning Robert8887
281874Greetings MaryGood Morning Robert
333847Hello Bob81874
451722G'Morning KatyGreetings Mary
599195Good Morning Robert33847
657419Greetings MaryHello Bob
798331Hello Bob51722
817369G'Morning KatyG'Morning Katy
923433Good Morning Robert99195
106774Greetings MaryGood Morning Robert
1152728Hello Bob57419
1290982G'Morning KatyGreetings Mary
138172Good Morning Robert98331
1499338Greetings MaryHello Bob
1530258Hello Bob17369
1689581G'Morning KatyG'Morning Katy
1779542Good Morning Robert23433
1837985Greetings MaryGood Morning Robert
1978549Hello Bob6774
2032893G'Morning KatyGreetings Mary
2116555Good Morning Robert52728
2273242Greetings MaryHello Bob
2366508Hello Bob90982
243344G'Morning KatyG'Morning Katy
2586641Good Morning Robert8172
2625042Greetings MaryGood Morning Robert
Sheet1
Excel 2003
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.


Alternatively, you could use a simple macro to do the same.

Code:
Sub TabletoCol()
    Dim LR As Long, Rng As Range, i As Long
    LR = Range("A" & Rows.Count).End(xlUp).Row
    For i = 1 To LR
        Set Rng = Range(Range("A" & i), Range("A" & i).End(xlToRight))
        If Range("E1").Value = "" Then
            Range("E1").Resize(Rng.Count).Value = Application.WorksheetFunction.Transpose(Rng)
        Else
            Range("E" & Rows.Count).End(xlUp).Offset(1, 0).Resize(Rng.Count).Value = Application.WorksheetFunction.Transpose(Rng)
        End If
    Next i
End Sub
<input id="gwProxy" type="hidden"><!--Session data--><input *******="jsCall();" id="jsProxy" type="hidden">
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,539
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top