+ Reply to Thread
Results 1 to 4 of 4

How to create a macro to sort a .csv

  1. #1
    Registered User
    Join Date
    12-04-2008
    Location
    Mesa, az
    Posts
    2

    How to create a macro to sort a .csv

    This is my first post, I'm glad I found this forum.

    I need to create a macro to sort a .csv into a readable format, like a report. The .csv contains data related to users and various stats attributed to each user. I want to be able to run a macro to generate a form with employee names and columns with each stat that I can conditional format as I need.

    We have something like this already that was created a few years back by another employee that takes three .csv files and generates one easy to read report, but its fairly complex and we have yet to dissect it with any success. I will need to build this from the ground up.

    I sense there is no easy answer to this, I was hoping someone could just point me in the right direction. I'm sure I can figure it out but I don't know where to begin looking.

    Thanks,

    Andre

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    If the CSV is in the same format each time, you can start by recording a macro yourself of you manually importing the file and setting the importation settings the way you need them during the import.

    Once the data appears in your sheet the way you want, stop the recording macro and take a look at the code it generates. You learn a lot that way. That's a good place to start.

    TOOLS > MACRO > Record a new macro
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-04-2008
    Location
    Mesa, az
    Posts
    2
    Thanks Ill give that a try today.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    Did it work out OK? I've done that before so I know it serve.

    Be sure to EDIT your original post and mark the PREFIX box [SOLVED] if you're happy with your results.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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