text file

  1. A

    Making a text file with identical name & Path

    Hello all! I have some VBA that is creating a pipe delimited text file, but I am struggling to get the name correct. I have managed to save it in the same location, but attempting to name it the same as the excel file has failed. Any help would be greatly appreciated. Sub PipeDelimited()...
  2. F

    Importing Lines from a Text File Which Meet Certain Criteria using VBA

    Hi all, Looking to get some expert help as i'm a novice with VBA. I've currently tried searching online and i can't seem to find a macro that can help with what i am trying to do. Essentially i have large data files with more then 1.6 million lines of data. I currently have a macro which...
  3. N

    VBA for saving values in one column to text file

    Hello, New to the forum. I've learned a lot just reading. Wondering if someone can help me with the VBA code below. It DOES save the whole worksheet to a text file, but I would like it to also Only save content in Column K Skip over blank cells in Column K Sub saveText()...
  4. T

    Exporting Excel Workbook to Multiple Text Files Based on Formula

    Hello! I would like to design a macro that will split and Excel workbook with 3 columns (Name, Account Number, Occurrence) into multiple text files. The first column (named Occurrence) contains a formula which assigns a number (an occurrence) to each row of data depending on how many times the...
  5. M

    Range to a txt file attachment

    Hi all, I found some articles over the internet addressing similar problems like mine but for some reason couldnt tweak it to my needs. So appreciate if you can help me with it. I have a range in a tab that i want to attach in outlook email as a text file. Lets assume my range is code...
  6. M

    Read text file using ADO and populate a... Listbox in this example

    The below sub i created to populate a listbox using ADO to read a text file as Access and SQL were unavailable. I needed 2 columns from the txt file and one would differ per user so i used the persons computer username as the column name i would need (so it would work for anybody in the table)...
  7. M

    Copy 2 columns of data from a text file using criteria for listbox

    Hi all I have had a try with this and it's beaten me too. i'm trying to display 2 columns from a text file. Row 1 are headings and the environ$"username" will be the column name I wish to use and contains annual leave type data going down. And i would like to display column 1 which will have...
  8. M

    Update text file with excel user form data

    Hi All As usual i'm back with probably what is a really silly easy question. I have created a user form which has text boxes, labels, comboboxes, checkboxes etc. I would like to know if there's a way i can use them to update specific records in a text file. Basically If Column 1 uses the...
  9. K

    Export to Text File - Width Limitation Issues

    I have developed VBA coding to export contents of cells in a delimited format to a text file. Each line of data must be a continuous string but I am running into an issue with the width limitations of text files. The excess of some lines (that exceed the width limitations) appear below my data...
  10. S

    Auto import data from text files into Excel spreadsheet and merge

    I'm trying to automate my data import method to save time. Right now 2 text files are created and saved in a folder before being opened in Excel, the required data highlighted and then copied and pasted into the relevant cells in the ROPdata sheet shown below. The first file is called...
  11. andrewb90

    Export Renames current sheet

    Hello all, I am trying to export data from a sheet, but when I do, it creates a txt file and renames my workbook the same thing. I just need to have the text file created. Sub export() ' Application.CutCopyMode = False ActiveWorkbook.SaveAs...
  12. C

    Combine all text files in folder into one.

    I can make my request easier known by showing how I know to do something: From the windows command prompt, I can type cd C:\strFolderName\strSubFolderName\ and it will change to the directory. then if I type Copy *.txt ALL.txt When you do this it will make a new .txt file called "All.txt"...
  13. J

    VBA Write Active Sheet Cell Data to External File WITHOUT Quotes

    What I'm trying to achieve should be simple, but Excel keeps making it very difficult for me. All I want is a macro that does exactly the following and nothing else: Export all of the data in the active sheet to a text file in the active workbook directory The filename should be the name of...
  14. O

    Import Text File

    When I import a text file, there is a question mark that appears in a cell but not in the original text file. Also, it combines the text in in one cell when it should be in two separate columns. The first line in the picture is correct. The second line in the picture is wrong...
  15. K

    VBA from Windows to Mac

    Hi all, I had this code working great on my PC. When converting to mac, it will create the text file but fails at the "save-as". I have the newest excel for mac. Can any give advice? Here is the Sub ExportCSV() ' ' ExportCSV Macro Dim MyPath As String Dim MyFileName As String 'The path...
  16. T

    converting currency to txt file format

    I need to change a dollar amount to a zero filled field in a text file. i.e. 231.17 to: 000000023117 and 250.00 to: 000000025000 Help!
  17. U

    vba code to copy the embedded text file from excel and to paste in a floder

    Hi... need help sooon! I am trying to copy the text file which is embedded in my excel, and trying to paste it in a folder using the below code. ActiveSheet.OLEObjects(1).Copy CreateObject("Shell.Application") _ .Namespace(ActiveWorkbook.Path & "\") _ .Self.InvokeVerb "Paste" It is working...
  18. J

    How to delete the top and bottoms rows of each Text file in Power Query

    Hello, I need to set up a power query so that it for each Text file that is in a folder the top 8 and bottom 4 rows are deleted when imported. Is this possible and if so how do I do it?
  19. C

    Extracting specific data from text file to excel spreadsheet

    Hello all! I am working on a macro that will pull specific data from a text file and put it into a spreadsheet. It has to be user friendly because after it is completed, I will not be the one who is using it. I have looked on many sites and came up with this code to make it pick out the first...
  20. S

    text file parser using file operators

    Hi There! I wanted to parse a text file searching for text "$$$$$" and append some come content at the end og the line where the text is found. example: input file: Hi there! you read this msg $$$$$ 1234,2345 output file: Hi there! you read this msg $$$$$ 1234,2345,6479 Added 6479...

Watch MrExcel Video

This Week's Hot Topics

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