+ Reply to Thread
Results 1 to 9 of 9

Macro to create txt-file with pipe seperator

  1. #1
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    569

    Macro to create txt-file with pipe seperator

    Hello


    I would like to accomplish the following task using a macro.

    1. I select a range, eg. A6187:B6188
    2. I run the macro
    3. It creates a txt-file with the "|" seperato - as shown in the second image
    4. It saves the txt-file to a specified location


    Screenshot 2017-07-26 20.46.12.png



    Screenshot 2017-07-26 20.46.25.png



    Thank you !!!

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Macro to create txt-file with pipe seperator

    Read my blog post about writing text files from Excel here: http://excel.solutions/2014/04/using...-to-text-file/
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    569

    Re: Macro to create txt-file with pipe seperator

    Great ! But how do I change it so only a selected range is wrote to text file ?

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Macro to create txt-file with pipe seperator

    Just amend this line:
    Please Login or Register  to view this content.
    So if you want to base it on the selected cells, then change it to:
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    569

    Re: Macro to create txt-file with pipe seperator

    that was an easy fix

    Thank you !!

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Macro to create txt-file with pipe seperator

    Happy to help, thanks for the feedback

  7. #7
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    569

    Re: Macro to create txt-file with pipe seperator

    would you mind giving me rep as well ?

  8. #8
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Macro to create txt-file with pipe seperator

    Quote Originally Posted by elgato74 View Post
    would you mind giving me rep as well ?
    For asking a question?!

    Nice try!!

  9. #9
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    569

    Re: Macro to create txt-file with pipe seperator

    sorry i thought i rep works both ways. never mind. and thank you again.

+ 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. Urgent!! Macro to copy Data from Excel and creates Pipe Delimitted Txt file.
    By sesgiri in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-29-2014, 10:09 AM
  2. Macro needed to save file in pipe delimited format
    By Blaked86 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2014, 09:04 AM
  3. [SOLVED] Macro to generate a pipe delimited text file
    By strabgus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-04-2013, 12:06 PM
  4. Combine Excel Sheets (+2 Million Rows total) and Create Pipe Delimited TEXT File
    By kestefon in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-05-2013, 08:51 PM
  5. VBA macro for Inserting text file(having pipe as delimiter) into Excel sheet
    By Nusrat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2013, 05:40 AM
  6. need macro to create pipe delimited text file from excel
    By nefkho in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2012, 12:03 PM
  7. Import Pipe Delimited File, Parse out certian Fields, create new f
    By StarBoy2000 in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 07-17-2005, 03:05 AM

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