+ Reply to Thread
Results 1 to 2 of 2

cleaning up data for a sort

  1. #1
    Forum Contributor
    Join Date
    09-30-2015
    Location
    LA my baby
    MS-Off Ver
    2013
    Posts
    727

    cleaning up data for a sort

    I have data that I would like to sort by state. However the data is very messy. What is the best approach (formulas, VBA?) to clean it up for a sort? Spreadsheet attached. The real data is 10,000 rows long. Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: cleaning up data for a sort

    Hi Steph,

    I am confused by the data! Perhaps D3 should be CA instead of AZ?

    If so, a helper column in C (headed Sort could have:
    C3: =D3
    C4: =IF(D4="",C3,LEFT(D4,2)) and copied down.

    Then use Column C to sort (with the Channel column as the secondary sort).

    (BTW: I had do delete some spaces which were in the "blank" cells D5:D8 I think)

    I hope this helps, please let me know!

    Regards,

    David


    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".

    Attached Files Attached Files

+ 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. Data cleaning
    By platesigns in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2014, 12:59 PM
  2. Help cleaning up data
    By Impartial Derivative in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-12-2011, 01:26 PM
  3. Sort Macro - Cleaning up code
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-25-2010, 06:29 PM
  4. Need Help With Cleaning Data
    By fennman in forum Excel General
    Replies: 6
    Last Post: 07-10-2008, 06:42 AM
  5. #NA, cleaning data!
    By thardy in forum Excel General
    Replies: 7
    Last Post: 02-26-2007, 06:39 PM
  6. Data cleaning
    By a303 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-20-2007, 03:10 PM
  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