+ Reply to Thread
Results 1 to 6 of 6

Rearrange Data

  1. #1
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Rearrange Data

    I'm not sure if this can be done or not, I need code that will prioritize data and delete if necessary, I need the data in range M2:V to be looked at and if anything in row is evident delete, so for example if the data sequence is D52, D52, D54, D56 I need the data to delete the D56, I have attached a workbook with these examples, The list of priorities starting with the highest are; D54, D55, D56, D58, D61, D60 so if any of the list is before D54 in a row it should be deleted and for example if D56 is evident after D61 then D61 should be deleted.
    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Rearrange Data

    You are going to have to explain this better or maybe in a different way. Why is D56 deleted in your verbal example?

    On row 7 there is no D56, yet there is one on row 36. Howe did you get from one to the other?
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Re: Rearrange Data

    OK, Sorry for being unclear, Ill put it this way, if for example in row 3 there are 4 entries I D52, D54, D52 & D55 the I would want D55 deleted as it is after D54 on the priority list or if in row 5 there is D52, D61, D56 then I would like to delete D61 as it is in front of D56 on the priority list, Does this clear it up?

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Rearrange Data

    I'm still not getting it.

    Here is what I think you are saying: look at the current value and look at the next value. If the next value is less than the current value, delete the next value.

  5. #5
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Re: Rearrange Data

    Yes thats correct, Look at the value and if D54 is in the list then delete everything after it and so on dependent on the priority.

  6. #6
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Rearrange Data

    Here is the code, however you will have to modify it. The list of priorities in the description is different than some of the codes on the worksheet. For example codes D51 and D52 are missing.
    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. [SOLVED] Rearrange Data
    By sanju2323 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-19-2016, 10:21 AM
  2. [SOLVED] Rearrange data with vba
    By ExcelMartin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-11-2013, 07:09 AM
  3. I need to rearrange a lot of data
    By dionnmj1 in forum Excel General
    Replies: 2
    Last Post: 08-27-2012, 09:18 AM
  4. Rearrange Data
    By Madan in forum Excel General
    Replies: 4
    Last Post: 03-10-2010, 01:38 AM
  5. Rearrange Data
    By cutsygurl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2009, 12:44 PM
  6. Rearrange Data
    By snowmonkey in forum Excel General
    Replies: 7
    Last Post: 09-02-2009, 05:57 AM
  7. Rearrange Data
    By kiddo7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-18-2006, 06:16 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