+ Reply to Thread
Results 1 to 2 of 2

Record macro to sort individual columns and remove duplicates and repeat for next column

  1. #1
    Registered User
    Join Date
    07-18-2019
    Location
    SA
    MS-Off Ver
    365
    Posts
    1

    Record macro to sort individual columns and remove duplicates and repeat for next column

    Good day

    I am trying to create a unique list. To achieve this I am copying data into column A. Running a text to columns command to create an unspecified number of columns base on a character such as a semi colon or slash or whatever I choose.

    I then want to record a macro that can highlight the selected column, sort it and remove duplicates and move to the adjacent column at the push of the button.

    This process must repeat until I have sorted all the columns in order to remove the spaces in between the rows.

    After I have cleaned the data as above I want to copy the the column data into the first column and sort it to create a unique list. I can only achieve this easily by removing the blank rows. Each column can be sorted independently from any adjacent column, because the data will be copied and stacked to column A.

    My request for help is how do I record the macro to sort each column and move to the next one at the push of a button.

    Thank you
    Attached Files Attached Files
    Last edited by AlexV13; 07-18-2019 at 08:18 AM. Reason: adding content

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Record macro to sort individual columns and remove duplicates and repeat for next colu

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

+ 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] Sort columns B,C,D based on column B then loop to next 3 columns and repeat till last colu
    By Andy15 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-09-2017, 05:35 PM
  2. [SOLVED] Sort and remove duplicates based on 3 columns
    By gauti14 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2016, 04:51 PM
  3. Multicolumn Listbox - How to remove duplicates and sort by first column?
    By s2jrchoi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-17-2013, 02:30 PM
  4. Replies: 4
    Last Post: 05-03-2013, 04:35 PM
  5. Excel 2007 : sort duplicates to individual columns
    By jmhan2209 in forum Excel General
    Replies: 4
    Last Post: 03-04-2012, 12:57 AM
  6. Replies: 0
    Last Post: 07-07-2011, 05:04 PM
  7. Remove Duplicates from 2 columns then auto sort
    By Dsnellin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2011, 03:09 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