+ Reply to Thread
Results 1 to 4 of 4

Sorting issues / help

  1. #1
    Registered User
    Join Date
    08-23-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    2

    Sorting issues / help

    Hi guys!

    New here and here goes my first post!

    I need help with a formula that sorts several rows for me while keeping the right values in the right place - really hard to explain so I'm gonna goa ahead and show it instead:

    Let say I have several rows with several columns with different value in each cell.
    But at the end of 1st row (the last cell) I have a value of A, in the end of 2nd row I have a value of B, in the end of 3rd row I have again a value of A and in the end of 4th row I have the value of B again.
    Please Login or Register  to view this content.
    And this will go on for all the following rows in the sheet.

    I need to allways keep this sorting. So lets say If I remove the 2nd row completely (which I will need to do in the project that I'm working on) then I would get the values AABABABAB.

    What I need it to do then is to move up the the next row with the value of B (in this example the row the number of 4 infront )and put that row between the rows 1 and 3 and keep doing this for all the rows and end up with this:

    Please Login or Register  to view this content.
    The idea is to allways sort so that A allways follows by B and so on.

    The Values A and B can be replaced by 1 and 2 or 100 and 200. It really doesn't matter as long as the formula keeps the original sorting.
    In the end, when removing a row, all it needs to do is to move all the rows with the values of B one step up and again het the ABABAB sorting in place

    I hope I managed to explain it good enough, otherwise let me know and I try to explain it again

    Thanks in advance!

    //virre
    Last edited by virre; 08-23-2013 at 10:21 AM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Sorting issues / help

    Hi

    I don't think that this is possible without a macro.

    The one below will run whenever you make a change on the page.

    to view and amend it you need to right click on the sheet name at the bottom of excel and select view code.


    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-23-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Sorting issues / help

    Quote Originally Posted by mehmetcik View Post
    Hi

    I don't think that this is possible without a macro.

    The one below will run whenever you make a change on the page.

    to view and amend it you need to right click on the sheet name at the bottom of excel and select view code.
    Thanks alot, exactly what I needed!

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Sorting issues / help

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Sorting Issues
    By Shepsil in forum Excel General
    Replies: 1
    Last Post: 10-22-2012, 11:18 AM
  2. [SOLVED] Sorting Issues
    By ildestino in forum Excel General
    Replies: 6
    Last Post: 04-11-2012, 09:29 AM
  3. sorting issues
    By timjl in forum Excel General
    Replies: 11
    Last Post: 01-24-2009, 07:25 PM
  4. Sorting Issues
    By MissTee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-04-2007, 11:17 PM
  5. Issues with sorting
    By Matthew McManus in forum Excel General
    Replies: 1
    Last Post: 06-29-2005, 08:05 AM

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