#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default text to table?

XL 2003

I have about 150 groups that I would like to put into rows in Excel...
1 row/group.

They are like this:

WOODSTOCK & DISTRICT BIG BROTHERS ASSOC. INC.
378 Hunter St
Woodstock, ON N4S 4G2
(519) 539-7469

www.bigbrotherswoodstock.ca

BIG BROTHERS BIG SISTERS OF YORK
PO Box 126, 145 Main St. S
Newmarket, ON L3Y 3Y9
(905) 895-0289

www.bbbsy.ca

There are tabs at the end of each and every line.
(or if I paste the data unformatted, there are returns at the end of
each and every line.)

I would like 1 row and 6 columns per group. I know I can copy and
paste special transpose each group but I have lots of them!
Is there an easier way to do this?

....Lisa

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default text to table?

If there are always 6 lines and a blank line between each group, then try:

With data in column A (A1):

in B1:


=INDIRECT("A"&(INT(ROW()-1)*7+COLUMN()-1))

Copy across required columns and down until blank entries reached.

" wrote:

XL 2003

I have about 150 groups that I would like to put into rows in Excel...
1 row/group.

They are like this:

WOODSTOCK & DISTRICT BIG BROTHERS ASSOC. INC.
378 Hunter St
Woodstock, ON N4S 4G2
(519) 539-7469

www.bigbrotherswoodstock.ca

BIG BROTHERS BIG SISTERS OF YORK
PO Box 126, 145 Main St. S
Newmarket, ON L3Y 3Y9
(905) 895-0289

www.bbbsy.ca

There are tabs at the end of each and every line.
(or if I paste the data unformatted, there are returns at the end of
each and every line.)

I would like 1 row and 6 columns per group. I know I can copy and
paste special transpose each group but I have lots of them!
Is there an easier way to do this?

....Lisa


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default text to table?

XL 2003

I have about 150 groups that I would like to put into rows in Excel...
1 row/group.

They are like this:

WOODSTOCK & DISTRICT BIG BROTHERS ASSOC. INC.
378 Hunter St
Woodstock, ON N4S 4G2
(519) 539-7469

www.bigbrotherswoodstock.ca

BIG BROTHERS BIG SISTERS OF YORK
PO Box 126, 145 Main St. S
Newmarket, ON L3Y 3Y9
(905) 895-0289

www.bbbsy.ca

There are tabs at the end of each and every line.
(or if I paste the data unformatted, there are returns at the end of
each and every line.)

I would like 1 row and 6 columns per group. I know I can copy and
paste special transpose each group but I have lots of them!
Is there an easier way to do this?


See if this macro does what you want (shown here being executed in response
to a CommandButton click)...

Private Sub CommandButton1_Click()
Dim X As Long
Dim R As Range
Dim Txt As String
Dim Lines() As String
On Error GoTo Done
For Each R In Range("A1:A200")
Txt = R.Value
If InStr(Txt, Chr$(9)) Then
Txt = Replace(Txt, Chr$(9), vbLf)
ElseIf InStr(Txt, vbCrLf) Then
Txt = Replace(Txt, vbCrLf, vbLf)
End If
Lines = Split(Txt, vbLf)
For X = 0 To 5
Cells(R.Row, R.Column + X).Value = Lines(X)
Next
Next
Done:
End Sub

I assumed your data is in column A starting at row 1 (although you said you
had 150 groups, I allowed for up to 200, but you can change that if you
want). If your data is in a different column, or starts at a different row,
then make the necessary change in the Range object reference in the For Each
statement.

Rick

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default text to table?

Gerry

Easiest and quickest is with a macro but note the formulas methos posted at
bottom.

Sub ColtoRows()
Dim Rng As Range
Dim I As Long
Dim j As Long
Dim nocols As Long
Set Rng = Cells(Rows.Count, 1).End(xlUp)
j = 1
On Error Resume Next
nocols = InputBox("Enter Number of Columns Desired")

For I = 1 To Rng.Row Step nocols
Cells(j, "A").Resize(1, nocols).Value = _
Application.Transpose(Cells(I, "A").Resize(nocols, 1))
j = j + 1
Next
Range(Cells(j, "A"), Cells(Rng.Row, "A")).ClearContents

End Sub

You do not really need a macro to accomplish your task BTW.

In B1 enter this formula................

=INDEX($A:$A,(ROWS($1:1)-1)*6+COLUMNS($A:B)-1)

Copy across to Column E then select B1:G1 and copy down untill you get zeros.


Gord Dibben MS Excel MVP

On Mon, 04 Jun 2007 10:58:53 -0700, "
wrote:

XL 2003

I have about 150 groups that I would like to put into rows in Excel...
1 row/group.

They are like this:

WOODSTOCK & DISTRICT BIG BROTHERS ASSOC. INC.
378 Hunter St
Woodstock, ON N4S 4G2
(519) 539-7469

www.bigbrotherswoodstock.ca

BIG BROTHERS BIG SISTERS OF YORK
PO Box 126, 145 Main St. S
Newmarket, ON L3Y 3Y9
(905) 895-0289

www.bbbsy.ca

There are tabs at the end of each and every line.
(or if I paste the data unformatted, there are returns at the end of
each and every line.)

I would like 1 row and 6 columns per group. I know I can copy and
paste special transpose each group but I have lots of them!
Is there an easier way to do this?

...Lisa


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table and Text James O Excel Discussion (Misc queries) 1 September 26th 06 07:29 PM
enter text below table doll face Excel Discussion (Misc queries) 2 June 25th 06 03:11 PM
text in a pivot table Cate Excel Discussion (Misc queries) 1 June 16th 06 12:53 AM
Need a pareto of a text table Mike H Excel Worksheet Functions 0 June 13th 06 05:48 AM
pivot table with text Neil Excel Discussion (Misc queries) 2 February 22nd 05 11:19 PM


All times are GMT +1. The time now is 04:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"