+ Reply to Thread
Results 1 to 6 of 6

Spreadsheet saveas .csv macro - with data editing

  1. #1
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Spreadsheet saveas .csv macro - with data editing

    Hi Everyone,

    At the moment my data looks like this
    School Child Forename Child Surname Parent Surname Parent DOB Parent NI Eligible
    school1 cforename1 csurname1 psurname1 1/1/1990 JA123456A Yes
    school1 cforename2 csurname2 psurname2 JA123456B Missing
    school2 cforename3 csurename3 psurname3 1/2/1990 Missing
    school2 cforename3 csurename3 psurname3 1/2/1990 JC123456A No


    Is there any possibility to create a macro to export to .CSV with selected columns in a different format and with no headers an example is below in the correct format and a blank column in B
    i.e.
    JA123456A pleaseleaveblank 19900101 psurname1
    JC123456A 19900201 psurname3

    please note the date in the original spreadsheet is DD/MM/YYYY and in the .CSV it needs to be yyyymmdd.

    Thanks in advance!
    Last edited by Ashley1993; 11-18-2014 at 07:57 AM.

  2. #2
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Spreadsheet saveas Macro

    I hope someone can help!

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Spreadsheet saveas .csv macro - with data editing

    Hi, Ashley1993,

    maybe try it like this:
    Please Login or Register  to view this content.
    It may be very important to you but Forum Rules tell something about a day to wait before pushing.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Spreadsheet saveas .csv macro - with data editing

    Hi Holger,

    Thank you for your response.

    However When I run that macro it doesn't go into seperate cells, for example:
    JA123456A || 19900101 PSURNAME blank blank blank
    JA123456A || 19900101 PSURNAME blank blank blank
    JA123456A || 19900101 PSURNAME blank blank blank

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Spreadsheet saveas .csv macro - with data editing

    Hi, Ashley,

    you could use TextToColumns to split the contents.

    Please Login or Register  to view this content.
    Ciao,
    Holger

  6. #6
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Spreadsheet saveas .csv macro - with data editing

    Holger, you are a genius!!! If I am ever in Germany I will come buy you a drink

    Thanks

+ 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. SaveAs Macro
    By bhenderson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-29-2011, 12:04 AM
  2. Saveas macro question
    By eatcress in forum Excel General
    Replies: 2
    Last Post: 06-16-2011, 03:37 AM
  3. SaveAs Macro
    By sumitomo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2010, 04:54 PM
  4. SaveAs macro
    By mrggutz in forum Excel General
    Replies: 5
    Last Post: 08-09-2010, 11:54 AM
  5. [SOLVED] Saveas Macro
    By Nigel in forum Excel General
    Replies: 3
    Last Post: 05-11-2005, 09:06 AM

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