+ Reply to Thread
Results 1 to 4 of 4

How to import multiple text files in its own unique column

  1. #1
    Registered User
    Join Date
    02-23-2022
    Location
    Sydney
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2201 Build 16.0.14827.20198) 64-bit
    Posts
    2

    How to import multiple text files in its own unique column

    Hi everyone,

    I have multiple text files that contain a single column of data, and I would like to import the files in its own column.

    For example:
    File A name occupies cell A1 and the data occupies from cell A2 onwards down the column
    File B name occupies cell B2 and the data occupies from cell B2 down the column, etc.

    I've looked into power query, but it just combines all the data from the text files into 2 columns.

    Any guidance and help would be appreciated! Thank you all in advance!
    Last edited by FlyanRyan; 02-24-2022 at 05:26 PM. Reason: Uploading excel sheet

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,004

    Re: How to import multiple text files in its own unique column

    Hi there.

    A picture is worth 1,000 words. An Excel sheet is worth 1,000 non-editable pictures.

    Please read the yellow banner about sample worksheets, at the top of the screen. Act on its guidelines and post a SMALL sample sheet complete with an explanation and some expected results.

    I have no idea what Excel version "2201" is supposed to be. Pleasse update to tell us the EXCEL version you are using... and if its for PC or Mac.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    02-23-2022
    Location
    Sydney
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2201 Build 16.0.14827.20198) 64-bit
    Posts
    2

    Re: How to import multiple text files in its own unique column

    Hi Glenn,

    Sorry about that, I'm new to the forum.
    I have now updated my excel version.
    I am currently using PC and have attached a small excel sheet in my first post that describes what I want and where I'm stuck at in two separate tabs.

    Best regards,
    Ryan

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,548

    Re: How to import multiple text files in its own unique column

    I could not find a way to pivot the proper data set in columns A:B on the try with power query sheet using Power Query, so I used formulas.
    The formula for the column headings (E3:H3) is: =IFERROR(INDEX($A2:$A61,MATCH(0,INDEX(COUNTIF($D3:D3,$A2:$A61),,),)),"")
    The formula for the values from Column1 is: =IFERROR(INDEX($B$2:$B$61,AGGREGATE(15,6,(ROW($B$2:$B$61)-ROW($B$1))/($A$2:$A$61=E$3),ROWS(E$4:E4))),"")
    Note that I feel there are Excel 365 version dynamic array formulas that will accomplish the entire process, so perhaps someone who has access to those will help.
    Note that for making further calculations using the values in Column1 the proper data set in columns A:B will likely be more useful than the matrix in columns E:H.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Import multiple text files to work sheets which is having same as Text file name
    By rseerala in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-28-2021, 09:30 AM
  2. [SOLVED] [adapt] Import Specific Text - Extracted from Multiple Text Files into Worksheet
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-21-2020, 08:29 AM
  3. Import multiple text files
    By bnlszl in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2019, 01:40 PM
  4. Iterative process to import multiple text files into multiple excel files
    By Ecth3lion in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-29-2018, 01:04 PM
  5. Macro to Parse Text - Import text to Excel from Multiple Text Files & Folders
    By Novice_To_Excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2012, 01:05 AM
  6. [SOLVED] Import multiple text files to 1 column
    By vbarookie_1000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-07-2012, 02:55 PM
  7. Import of Multiple Text Files
    By yanks6rule in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2006, 07:34 PM

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