+ Reply to Thread
Results 1 to 7 of 7

Macro to change CSV file

  1. #1
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    569

    Macro to change CSV file

    Dear All

    I have a csv file which I open in Excel and which I then need to be changed by a macro in the following scheme:

    Column F needs to be copied and pasted into a new sheet in Column M,
    Columns Y + Z need to be combined and then copied / pasted in C
    AB > G
    AC + AD combined > F
    AF > J
    AG > H
    AH > K
    AT > D
    W > E

    The csv file has a header row, which I do not need, so macro starts at Row 2

    The filled new sheet needs to be saved as csv once the above transitions are done.

    Attached sample csv which needs to be converted as described above.

    Thank you in advance!
    Attached Files Attached Files
    Last edited by elgato74; 12-01-2018 at 03:33 PM.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,560

    Re: Macro to change CSV file

    Try
    You need to have one sheet named "Sheet1", before you run the code.
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    569

    Re: Macro to change CSV file

    Great! Thank you very much. Only these two are missing:

    1 "Columns Y + Z need to be combined and then copied / pasted in C"

    2 "Column F needs to be copied and pasted into a new sheet in Column M"
    Last edited by elgato74; 12-02-2018 at 12:04 PM.

  4. #4
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    861

    Re: Macro to change CSV file

    Hi Elgato

    Do you think you can modify Jindon's code to adapt the last 2 requirements?
    Do you need help understanding how the code works?
    .. and don't forget to have fun!
    Bogdan.

    mark SOLVED and Add Reputation if my answer pleases you

  5. #5
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    569

    Re: Macro to change CSV file

    Thanks. Do you?

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,560

    Re: Macro to change CSV file

    Quote Originally Posted by elgato74 View Post
    Column F needs to be copied and pasted into a new sheet in Column M,
    Columns Y + Z need to be combined and then copied / pasted in C
    AB > G
    AC + AD combined > F
    AF > J
    AG > H
    AH > K
    AT > D
    W > E
    I thought it was alright...

    Change to
    Please Login or Register  to view this content.
    Last edited by jindon; 12-02-2018 at 08:19 PM.

  7. #7
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    569

    Re: Macro to change CSV file

    now it is perfect thank you!

+ 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] How to change file path in macro
    By LDSruyorPro in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2014, 02:01 PM
  2. Macro: Help, Need Macro, Change Color, Open File, Restart at date
    By fastfire in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-09-2013, 05:52 PM
  3. Macro change as file name changes...
    By deernor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-30-2012, 10:50 AM
  4. [SOLVED] change name of a macro from the name of the file
    By petelomax in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-03-2012, 07:23 AM
  5. Macro issues when I change my file name
    By pingwin77 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-16-2012, 02:20 PM
  6. Macro to change value in source file
    By Mysore in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-29-2012, 12:56 AM
  7. vba to change macro file name
    By blackstar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-02-2007, 12:14 AM
  8. Macro to change file types
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2007, 05:50 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