+ Reply to Thread
Results 1 to 7 of 7

VBA Macro to create CSV file for only selected cells

  1. #1
    Registered User
    Join Date
    09-23-2020
    Location
    NY
    MS-Off Ver
    office20016
    Posts
    11

    VBA Macro to create CSV file for only selected cells

    Hi Experts,

    I have a requirement like i have workbook and its contains 3 worksheets, from 2nd worksheet i want to write a VBA code to create CSV file either in share folder or local drive and it should pop up user to select the path.
    and while creating the CSV i want to select only specific columns only from the source,
    for Example i have data Column A to Column Z and i want to create CSV file whith Specific columns like A,B,G,K,L,M R,S,T only.

    Please advise some VBA code,

    I really appreciate quick response.

    Thanks,
    Babu

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA Macro to create CSV file for only selected cells

    The filename is CSV_Report with a Date\Time stamp. Change it to suit.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    09-23-2020
    Location
    NY
    MS-Off Ver
    office20016
    Posts
    11

    Re: VBA Macro to create CSV file for only selected cells

    Hi Expert,

    I really very very thank you for quick response, the code is working as expected.
    Once again thank you very much.

    Thanks,
    Babu

  4. #4
    Registered User
    Join Date
    09-23-2020
    Location
    NY
    MS-Off Ver
    office20016
    Posts
    11

    Re: VBA Macro to create CSV file for only selected cells

    Hi Expert,

    I have one more question, can we add specific row to start preparing CSV file.
    I mean first few rows i want to add some information and logo.

    Thanks,
    Babu

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA Macro to create CSV file for only selected cells

    This will add three blank rows at the top.

    Please Login or Register  to view this content.
    The CSV file format wouldn't save a logo. Text and commas only.
    Last edited by AlphaFrog; 09-24-2020 at 08:21 PM.

  6. #6
    Registered User
    Join Date
    09-23-2020
    Location
    NY
    MS-Off Ver
    office20016
    Posts
    11

    Re: VBA Macro to create CSV file for only selected cells

    Hi Experts,

    I dont want any blank rows in CSV file, while preparing the CSV file , the source data has to be read from sheet(2) and starting row = 5.

    Thanks,
    Babu

  7. #7
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA Macro to create CSV file for only selected cells

    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. [SOLVED] Trying to create a macro to place selected values from a file search into a list
    By Cbird in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2017, 11:35 PM
  2. need macro to create a file of selected items using a combo box
    By codransel in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 10-28-2014, 01:15 PM
  3. Macro to AutoFilter create PDF/Mail and copy selected data to Template Excel file
    By iancoupal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2014, 05:47 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. create a macro that will perform another macro on selected cells
    By JMJ123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-30-2013, 12:44 AM
  6. Create a new Excel file with selected cells
    By john in forum Excel General
    Replies: 1
    Last Post: 07-18-2006, 08:25 PM
  7. [SOLVED] Create a new Excel file with selected cells
    By john in forum Excel General
    Replies: 2
    Last Post: 07-17-2006, 07:35 PM

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