text file

  1. 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...
  2. 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()...
  3. 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...
  4. 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...
  5. 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)...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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"...
  12. 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...
  13. 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...
  14. 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...
  15. 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!
  16. 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...
  17. 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?
  18. 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...
  19. 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...
  20. Z

    Need to convert from Excel to text file fixed width, space delimited other than .prn

    I have an Excel file that I need to convert to a fixed width, space delimited text file, however when I tried converting to a .prn file it is wrapping the columns that exceed 240 characters per line. It has to text file with padded spaces or fixed width columns. What other format can I use...

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top