+ Reply to Thread
Results 1 to 8 of 8

Vba for data cleaning

  1. #1
    Registered User
    Join Date
    08-31-2020
    Location
    singapore
    MS-Off Ver
    2019
    Posts
    16

    Vba for data cleaning

    Hi, I need a way to clean up my data so that after it is done, I can use a pivot table to make sense of my data. I have something like this
    ExcelExample1.png
    ,and I would like to convert it into
    ExcelExample2.png
    I have like 50000 rows of such messy data, and I do not want go through the data one by one to copy and paste.
    Therefore I am hoping if there is way of using VBA for this, any ideas is appreciated.
    Thank you.
    ATTACHED is an example file
    Attached Files Attached Files
    Last edited by coltan123; 09-02-2020 at 12:27 AM.

  2. #2
    Forum Contributor Dante Amor's Avatar
    Join Date
    07-24-2020
    Location
    MEXICO
    MS-Off Ver
    Excel 2013
    Posts
    212

    Re: Vba for data cleaning

    According to your file, the data starts in cell B9.
    Results in J9.


    Try this:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-31-2020
    Location
    singapore
    MS-Off Ver
    2019
    Posts
    16

    Re: Vba for data cleaning

    Work Perfectly. Thank you so much
    Just some questions, if I would like to add additional column , how do i go about in doing it and how do I put the data in another sheet. Much appreciated.

  4. #4
    Forum Contributor Dante Amor's Avatar
    Join Date
    07-24-2020
    Location
    MEXICO
    MS-Off Ver
    Excel 2013
    Posts
    212

    Re: Vba for data cleaning

    Try this:

    Change "F" in a = Range("B9:F" for the last column

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-31-2020
    Location
    singapore
    MS-Off Ver
    2019
    Posts
    16

    Re: Vba for data cleaning

    Hi,
    Sorry to keep troubling you, but the code is not working, it show a type mismatch error which, unfortunately, I am unable to troubleshoot. Hope you may help me out if you are free. Thank you.

  6. #6
    Forum Contributor Dante Amor's Avatar
    Join Date
    07-24-2020
    Location
    MEXICO
    MS-Off Ver
    Excel 2013
    Posts
    212

    Re: Vba for data cleaning

    Try this:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-31-2020
    Location
    singapore
    MS-Off Ver
    2019
    Posts
    16

    Re: Vba for data cleaning

    Awesome, it is working well. Thank you so much.

  8. #8
    Forum Contributor Dante Amor's Avatar
    Join Date
    07-24-2020
    Location
    MEXICO
    MS-Off Ver
    Excel 2013
    Posts
    212

    Re: Vba for data cleaning

    I'm glad to help you. Thanks for the feedback.

+ 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] Cleaning Data
    By sorensjp in forum Excel General
    Replies: 10
    Last Post: 12-23-2016, 01:55 PM
  2. cleaning up data
    By Trebor777 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-11-2016, 12:16 PM
  3. [SOLVED] Data Cleaning
    By cmokasak in forum Excel General
    Replies: 7
    Last Post: 07-08-2016, 03:08 AM
  4. Data cleaning
    By platesigns in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2014, 12:59 PM
  5. Need Help With Cleaning Data
    By fennman in forum Excel General
    Replies: 6
    Last Post: 07-10-2008, 06:42 AM
  6. Data cleaning, HELP!
    By a303 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-06-2007, 01:43 AM
  7. Data Cleaning
    By mazmjh in forum Excel General
    Replies: 1
    Last Post: 11-27-2006, 12:12 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