+ Reply to Thread
Results 1 to 6 of 6

Use a macro to turn an ugly data export into a clean tabular file

  1. #1
    Registered User
    Join Date
    02-08-2020
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    66

    Use a macro to turn an ugly data export into a clean tabular file

    I have no idea if this is possible but when I do a data dump from an accounting system, I get a lot of data (80,000+ rows) with terrible formatting. I'd like to be able to pivot it and run analysis but it would take forever just to get it into a decent format. I've attached a file showing what the data looks like and what I want it to look like. Essentially, I want to be able to remove the headers, remove the totals columns and repeat the data so that the format is in tabular. Is this even possible?

    Thanks in advance for looking.
    Attached Files Attached Files

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Use a macro to turn an ugly data export into a clean tabular file

    Instead of exporting the report as a formatted Excel file does your accounts program allow you to export the same report as a .csv file (most packages such as Sage/QuickBooks etc. do)
    If this is possible most of your problem is solved, then merely open the .csv file in Excel and all your columns will be neatly tabulated.
    torachan.

  3. #3
    Valued Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    467

    Re: Use a macro to turn an ugly data export into a clean tabular file

    Hi

    Of course it is possible. It's Excel.

    I have added a routine to do the tidy-up, using your sample file.
    I assigned the macro to a button (near column M) for convenience.

    zeddy
    Excel Cleaning Dept
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-08-2020
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    66

    Re: Use a macro to turn an ugly data export into a clean tabular file

    Thanks for the reply. Unfortunately, and surprisingly, our system can't export via csv.

  5. #5
    Registered User
    Join Date
    02-08-2020
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    66

    Re: Use a macro to turn an ugly data export into a clean tabular file

    zzzeddy. This is a brilliant macro! Worked like a charm. Thank you!

  6. #6
    Valued Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    467

    Re: Use a macro to turn an ugly data export into a clean tabular file

    Hi

    Thank you for letting us know. We like feedback.

    If you wanted a faster deluxe sheet cleaning service, we could probably improve that vba code.

    zeddy
    Excel Cleaning Dept

+ 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] Convert tabular data in unstructured text file to Excel
    By tax112 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-18-2019, 02:22 AM
  2. Replies: 2
    Last Post: 08-29-2019, 11:47 AM
  3. Convert tabular data into subtitle text file format (.srt) UTF-8
    By sabha in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-22-2018, 11:18 AM
  4. Create text file using VBA from Excel Tabular data
    By ganeshinscribe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-03-2018, 09:09 AM
  5. macro formula to clean data in large file
    By badams1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-07-2014, 11:35 PM
  6. Need a macro to export data to a csv file
    By dagwoodnil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2013, 06:13 PM
  7. Flat File to Tabular Data Set Conversion
    By november678x in forum Excel General
    Replies: 2
    Last Post: 05-14-2010, 01:47 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