+ Reply to Thread
Results 1 to 5 of 5

Generate text file from data table

  1. #1
    Registered User
    Join Date
    01-21-2009
    Location
    Rugby, England
    MS-Off Ver
    Excel 2007
    Posts
    22

    Generate text file from data table

    Anyone with experience generating (or replacing) a text file from data held in a table. I have a table made up of 4 columns and variable number of rows. Column A has 8-digit number; B has 8-digit number; C has text up to 40 chars; D has a number with two decimal points. I would like to generate or replace a text file in csv format containing each row's data EXCEPT where column D value (number with 2-decimal points) is 0.00.
    Using Excel 2003.

    Thanks for taking time to read this - IanS
    Last edited by Peanuts890; 01-27-2009 at 04:20 PM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    1) When you say the number is 0.00, do you mean that the number in the cell is zero, or may be non zero, but is 0.00 when rounded to 2 dec places?

    2) Can you just delete the rows that are 0.00, then do a save as in csv format?

    rylo

  3. #3
    Registered User
    Join Date
    01-21-2009
    Location
    Rugby, England
    MS-Off Ver
    Excel 2007
    Posts
    22
    Thanks for the response Rylo.
    The value 0.00 is indeed zero to two decimal places. I was thinking of an ignore if zero.
    The data in the table is hundreds of payment details of customers and I am trying to produce an input text file for a BACS transfer programme. The customers may have zero payment this time round, but next time it may be greater than zero. We don't want to delete customer's details when they don't pay and have to reinstate them when they do.
    There is other data on the worksheet, so a "Save as" in txt format won't work.
    Hope this makes sense.
    Ian
    Last edited by Peanuts890; 01-22-2009 at 05:01 PM. Reason: Spelling error

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    See if this gives you some direction.

    rylo
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-21-2009
    Location
    Rugby, England
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Generate text file from data table

    Eventually got it to work after rylo's help and looking at some other websites.
    So thanks to everyone.
    Attached file shows table and macro
    Regards,
    IanS
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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