+ Reply to Thread
Results 1 to 2 of 2

Help - Need macro to create a CSV file from a worksheet with different formatting

  1. #1
    Registered User
    Join Date
    09-14-2016
    Location
    Lansing, MI
    MS-Off Ver
    2013
    Posts
    1

    Help - Need macro to create a CSV file from a worksheet with different formatting

    Help - Need macro to create a CSV file from a worksheet with different formatting

    I've done a little C++, but am new to VBA.* Users need a button (or other easy method) that will copy rows from their worksheet into a new CSV file with a few changes.* The number of rows can vary, as well as the filename.* And is there an easy way for users to get this functionality?* I've attached an example of the original file and what the new CSV should look like (had to upload CSV as Excel).

    Table 1 (original workbook is Excel 2003)

    Project Number ERP Ref No. Project Name
    B004 5555 BB Jackson Project
    B005 abc123 BB Date Demo Project



    Table 2* (new CSV):* Some notes at the top, then a "D" in the first new column, and then "Standard" in the next new column for each record)*

    ~~Notes for user in top few rows.
    ~~~Notes for user in top few rows.
    ~Notes for user in top few rows.

    D Tab Name Project Number ERP Reference Number Project Name

    D Standard B004 5555 Jackson Project
    D Standard B005 abc123 Date Demo Project
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Help - Need macro to create a CSV file from a worksheet with different formatting

    Try this. It will create a CSV file in the same directory as the program with the same name as the program.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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. [SOLVED] macro to create an output file "worksheet"
    By dexterP in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-19-2015, 03:31 PM
  2. Create a macro to create a pivot table in a worksheet
    By Triscia in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-15-2015, 10:53 AM
  3. Replies: 1
    Last Post: 03-29-2014, 10:12 PM
  4. [SOLVED] Macro to create text file and write contents of selected cells to the file
    By m@cro in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-13-2013, 10:21 AM
  5. I need to create a macro that will change the formatting of a worksheet
    By Bryeguy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2012, 01:29 PM
  6. Replies: 3
    Last Post: 09-30-2011, 04:35 AM
  7. [SOLVED] Create a Worksheet by getting datas from the txt file with Macro
    By Mansoor Ali in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-19-2005, 05:06 AM

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