+ Reply to Thread
Results 1 to 2 of 2

Remove specific item from array while preserving order of remaining items

  1. #1
    Registered User
    Join Date
    08-15-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2010
    Posts
    87

    Remove specific item from array while preserving order of remaining items

    Let's say you have an array created as follows:

    Please Login or Register  to view this content.
    Let's then say you have another named range called RangeTest.

    Assume RangeMaster has the values 1,2,3,4,5,6,7,8,9, and 10 in it and RangeTest has the values 1,3,5,7 and 9 in it.

    I want to have some kind of code that loops through the value in RangeTest and if that value exists in the array rngMaster then remove that value.

    So the goal would be for rngMaster to end up with 2, 4, 6, 8 and 10 as elements in that order.

    Arrays are new to me.

    Can you do something like:

    Please Login or Register  to view this content.
    If so, can someone help with the code in the middle to actually remove the array element?

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Remove specific item from array while preserving order of remaining items

    attach a sample file
    If solved remember to mark Thread as solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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