+ Reply to Thread
Results 1 to 3 of 3

Removing Duplicates and sorting range as a 2d array

  1. #1
    Registered User
    Join Date
    10-16-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    2

    Removing Duplicates and sorting range as a 2d array

    Hi there,

    I am new to Excel VBA and I have to solve 2d array for linear interpolation. I have reach the point where I am selecting a range from the worksheet and checking for errors.

    I have checked errors for non numeric, empty cells and removing duplicates but since it's a 2d array so I have to check for duplicates in second column but now I have to take this selected range and turn it into an array so that I can sort out the array in ascending/descending order.

    For example:

    Column 1 Column 2
    2 12
    9 17
    11 21
    2 15
    7 15


    As you can you See, this isn't in ascending order. Can someone please help me with this?

    Thanks

    Kind Regards
    Last edited by Redsun; 10-25-2017 at 05:27 PM.

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Removing Duplicates and sorting range as a 2d array

    Welcome to the forum!

    For duplicates, it depends on what you define as duplicates. You can use Advanced Filter or Data > Data Tools > Remove Duplicates.

    Use Excel's sort once you get your range set as you want.

  3. #3
    Registered User
    Join Date
    10-16-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    2

    Re: Removing Duplicates and sorting range as a 2d array

    Thank you Ken, this was helpful!

+ 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] Removing duplicates from a single dimention Array
    By svh00987 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-29-2016, 09:42 AM
  2. Removing duplicates from an array based on value.
    By matt85webb in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-24-2015, 02:36 AM
  3. Taking average in 7 cells in a column
    By shawpnik in forum Excel General
    Replies: 3
    Last Post: 11-05-2014, 12:03 AM
  4. Removing Duplicates without moving cells up
    By Nickyh1984 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-09-2014, 06:02 PM
  5. Replies: 1
    Last Post: 07-15-2011, 08:36 AM
  6. Taking Array Data and Copying to Cells
    By AccountantCost in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2009, 11:31 PM
  7. merge data from array without removing column duplicates
    By aversluis in forum Excel General
    Replies: 3
    Last Post: 09-26-2007, 12:48 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