+ Reply to Thread
Results 1 to 6 of 6

Help with export data to text file.

  1. #1
    Registered User
    Join Date
    08-14-2013
    Location
    Kentucky, United States
    MS-Off Ver
    03,07,10
    Posts
    61

    Help with export data to text file.

    I have a text file generated with the following code that is pipe dilimited. What I am trying to accomplish is:
    1. remove the first three rows of the excel file from the text file
    2. in Column A (represented as Cells (N, 1) I need to skip if Alpha
    3. In Column A end if Blank

    Here is what I have so far. I am reciving Compile error " Next without For"

    Please Login or Register  to view this content.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Help with export data to text file.

    Perhaps...
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    08-14-2013
    Location
    Kentucky, United States
    MS-Off Ver
    03,07,10
    Posts
    61

    Re: Help with export data to text file.

    Thanks tiger, This works perfect!! Only one thing. On the end there are 7 rows (in the excel file these have value in them) that reflect pipes with nothing between them.Please see attached.

    Thanks
    Leslye
    Attached Files Attached Files

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Help with export data to text file.

    Can you upload a sample Excel file that is experiencing the issue? I can't really do much with just the text file...

  5. #5
    Registered User
    Join Date
    08-14-2013
    Location
    Kentucky, United States
    MS-Off Ver
    03,07,10
    Posts
    61

    Re: Help with export data to text file.

    I cannot, unfortunatly, It has company sensitive information. I can give you a more detailed description of what my goal is and what columns from the excel sheet are affected. The amount of rows however are variable.

    The goal is to have Columns A, C, E, L, P & S exported to a delimited text file. This text file will the be queried by SQL to go into other databases and reports.

    The first 3 rows are headers therefore are information that is not needed in the text file.

    Column A is tricky. an example of the data in listed form would be
    INDA
    4638
    4672
    4620
    4845
    4856
    MSTA
    4665
    4664
    4808
    4853
    PSTA
    4643
    7643
    4647
    4801
    7801
    4505
    4807
    4842

    the only value I need to pull is the numeric value.

    At the end of the listed numbers/ letters in Column A there is an empty row followed by 4 cells that have report data in them:
    Number of sites with BIE:
    # of sites closed w/errors:
    # sites G/L file resent:
    # of sites closed late:

    This data needs to be left off of the exported data. The only thing needed on the .txt file from Column A are the numbers starting at row 5 and ending at the first empty row. The data in the other columns are only reported based on the cells that have a number in them from column A.

    I hope this helps clarify. Please let me know if you can help in any way.

    Thanks again,
    Leslye

  6. #6
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Help with export data to text file.

    Please Login or Register  to view this content.

+ 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. Code to Export Excel Data to Text File
    By ashkash in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-13-2012, 05:59 AM
  2. export data to text file (.txt)
    By jsantos in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-03-2011, 06:12 AM
  3. Export Excel Form Data to Text File
    By The doomed in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-21-2010, 02:29 PM
  4. Excel 2007 : Button on Workbook to export data to Text file?
    By NewYears1978 in forum Excel General
    Replies: 3
    Last Post: 03-30-2010, 05:48 PM
  5. [SOLVED] How do I import text file, analyze data, export results, open next file
    By Geoffro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-06-2005, 04:06 PM

Tags for this Thread

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