+ Reply to Thread
Results 1 to 3 of 3

Excel Power Query is Joining Text Files Together - Need them on seperate Rows

  1. #1
    Registered User
    Join Date
    07-12-2015
    Location
    Essex
    MS-Off Ver
    2010
    Posts
    5

    Excel Power Query is Joining Text Files Together - Need them on seperate Rows

    Hi

    I am importing many files in to excel. They are text files. Using PowerQuery. They have about 40 lines of data in them, all on separate lines.

    0945996
    G ANDERSON
    1405
    Saturday 8th

    etc etc

    I want it to show going across so each line of data is in its own column - all across Row 1. So each text file has its data across the same Row, and lines of data in column A B C etc.

    But when I import all the txt into power query, I click on content and it joins them all together so all the data from all files is in column A going all the way down.

    Using normal Data import for the text file I can get it to work, but it will only do one file at a time. Need to use Power Query to get the whole folder in...

    Should look like (you might need to be on Desktop not mobile to view this properly):

    `
    Row Column A Column B Column C Column D
    1 0945996 G ANDERSON 1405 Saturday 8th
    2 0855686 A WATKINS 4774 Weds 4th
    3 0644844 K WILSON 1855 Thursday 11th
    `

    http://superuser.com/questions/94238...parate-rows-ba

    Thanks.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Excel Power Query is Joining Text Files Together - Need them on seperate Rows

    Enter this formula in C1 and pull it to F1 and then down

    =IFERROR(INDEX($A$1:$A$16,ROWS($A$1:$A1)*4-4+COLUMNS($A1:A1)),"")

    Row\Col
    A
    B
    C
    D
    E
    F
    1
    945996
    945996
    G ANDERSON
    1405
    Saturday 8th
    2
    G ANDERSON
    855686
    A WATKINS
    4774
    Weds 4th
    3
    1405
    644844
    K WILSON
    1855
    Thursday 11th
    4
    Saturday 8th
    5
    855686
    6
    A WATKINS
    7
    4774
    8
    Weds 4th
    9
    644844
    10
    K WILSON
    11
    1855
    12
    Thursday 11th
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    07-12-2015
    Location
    Essex
    MS-Off Ver
    2010
    Posts
    5

    Re: Excel Power Query is Joining Text Files Together - Need them on seperate Rows

    That works pretty well! Thanks. I should be back when I hit the next hurdle! Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Query multiple text files, one by one to put into rows
    By twofooted in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-12-2014, 06:10 PM
  2. [SOLVED] Numbering ROWS sequentially on seperate sheets or files
    By Busybirds in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-27-2012, 12:40 PM
  3. Replies: 7
    Last Post: 05-27-2009, 11:14 AM
  4. Joining Data between two excel files
    By Dalia in forum Excel General
    Replies: 2
    Last Post: 11-28-2006, 02:26 PM
  5. Any utility for joining two or more Excel or CVS files
    By headley sappleton in forum Excel General
    Replies: 1
    Last Post: 02-08-2006, 01:20 AM
  6. Any utility for joining two or more Excel or CVS files
    By headley sappleton in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2006, 01:20 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1