Row to Column 5 rows of data separated by null row

SOLTEC

Board Regular
Joined
Feb 11, 2015
Messages
195
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I have a very large spreadsheet that I have manually separated Name, address, city, state and zip code, with the phone number in Column A and I want to put name in column B, address in column C, city in column D, State and Zip in Column D, and finally the phone in column E. See attached image. Thank you in advance for any and all assistance as it is greatly appreciated.
 

Attachments

  • spreadsheet.png
    spreadsheet.png
    38.8 KB · Views: 3

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Row of all 5 columns with null betweenNameAddressCityState ZipTelephone
Miller-Huebl Funeral HomeMiller-Huebl Funeral Home1111 South Main StreetAberdeen, SD 57401(605) 225-8223
1111 South Main StreetSchriver's Memorial Mortuary414 5th Avenue NwAberdeen, SD 57401(605) 225-0691
AberdeenSpitzer-Osthus Funeral Home320 6th Avenue SeAberdeen, SD 57401(605) 225-7025
, SD 57401
(605) 225-8223
Schriver's Memorial Mortuary
414 5th Avenue Nw
Aberdeen
, SD 57401
(605) 225-0691
Spitzer-Osthus Funeral Home
320 6th Avenue Se
Aberdeen
, SD 57401
(605) 225-7025
 
Upvote 0
Power Query:
let
    TFR = Table.FromRecords({[Column = "Name"], [Column = "Address"], [Column = "City"], [Column = "State Zip"], [Column = "Telephone"]}),
    USC = Table.Unpivot(TFR, {"Column"}, "Attribute", "Value"),
    IndexTFR = Table.AddIndexColumn(USC, "Index", 1, 1),
    TCC = Table.CombineColumns(Table.TransformColumnTypes(IndexTFR, {{"Index", type text}}, "en-GB"),{"Attribute", "Index"},Combiner.CombineTextByDelimiter(".", QuoteStyle.None),"Merged"),
    Pivot = Table.Pivot(TCC, List.Distinct(TCC[Merged]), "Merged", "Value"),
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Filter = Table.SelectRows(Source, each ([raw] <> null)),
    Index = Table.AddIndexColumn(Filter, "Index", 0, 1),
    IDC = Table.TransformColumns(Index, {{"Index", each Number.IntegerDivide(_, 5), Int64.Type}}),
    Group = Table.Group(IDC, {"Index"}, {{"Count", each _, type table}}),
    List = Table.AddColumn(Group, "Column", each [Count][raw]),
    Extract = Table.TransformColumns(List, {"Column", each Text.Combine(List.Transform(_, Text.From), "="), type text}),
    Split = Table.SplitColumn(Extract, "Column", Splitter.SplitTextByDelimiter("=", QuoteStyle.Csv), {"Column.1", "Column.2", "Column.3", "Column.4", "Column.5"}),
    RC = Table.RemoveColumns(Split,{"Index", "Count"}),
    TC = Table.Combine({Pivot, RC}),
    Promote = Table.PromoteHeaders(TC, [PromoteAllScalars=true])
in
    Promote
rawNameAddressCityState ZipTelephone
Miller-Huebl Funeral HomeMiller-Huebl Funeral Home1111 South Main StreetAberdeen, SD 57401(605) 225-8223
1111 South Main StreetSchriver's Memorial Mortuary414 5th Avenue NwAberdeen, SD 57401(605) 225-0691
AberdeenSpitzer-Osthus Funeral Home320 6th Avenue SeAberdeen, SD 57401(605) 225-7025
, SD 57401
(605) 225-8223
Schriver's Memorial Mortuary
414 5th Avenue Nw
Aberdeen
, SD 57401
(605) 225-0691
Spitzer-Osthus Funeral Home
320 6th Avenue Se
Aberdeen
, SD 57401
(605) 225-7025
 
Upvote 0
Expression.Error: We couldn't find an Excel table named 'Table1'.
Details:
Table1
 
Upvote 0
blue table is Table1

add header "raw" then select whole blue table and use Ctrl+T
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,823
Members
449,049
Latest member
cybersurfer5000

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