+ Reply to Thread
Results 1 to 2 of 2

Sorting goes wrong + macro

  1. #1
    Registered User
    Join Date
    07-21-2014
    Location
    Latvia
    MS-Off Ver
    2013
    Posts
    1

    Sorting goes wrong + macro

    Hello
    I have problem what I can't figure out. Here is a file. BC st.k..xlsx

    I will start to describe my problem. I have to sort column V but not from V1 but from V12/13 where is written Kopā(it is in Latvian). Sortation has to be done by macro. I looked on the internet how to do that and I tried to record macro where it tries to sort from lower number to higher and here is a problem when I try to do it sorting goes wrong because I have functions from F14 to R14 where it sums all penalties points (if there is any) and count them to S14. If there is penalty time there can be some penalty points at U14 as well. than we count all penalty points together (from S14 and V14) and put them in V14 and drag function down for rest of table. When I do that 0 number( I need blank cell) appears on V14 column that means when I try to sort "Kopā" points it goes wrong because I have to sort them many times before all table is done to tell judge score which is at the moment. Which means players who do race without any penalty points and with fastest time (in Latvian laiks, column T) has to be first but others who has penalty points goes to the button because there is 0 on the cells who havent participated yet.

    This is hard to understand but I will show you some pictures to make all clear:

    Attachment 333890 this one is before sorting
    Attachment 333891this one is after. As you can see players with points is at the button but I need them to be at the top, but sorted

    I hope someone can understand what I wrote (I know wasnt the best way how to tell it, at least not the most logical one)

    And maybe there is someone who can make macro with auto sorting after one row is filled. If not nothing bad will happen I know how to make macro to sort by multiple columns but then you have to run macro every time

  2. #2
    Forum Contributor
    Join Date
    03-28-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2010
    Posts
    166

    Re: Sorting goes wrong + macro

    Fungry,

    Try something like this only change the code to reflect your rows;

    Please Login or Register  to view this content.
    Hope this will help.

    LeapingLizard

+ 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. References goes wrong after sorting
    By sfs in forum Excel General
    Replies: 17
    Last Post: 10-02-2018, 04:36 PM
  2. [SOLVED] Wrong sorting ComboBox
    By jhonneyboy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-03-2014, 07:26 AM
  3. Replies: 5
    Last Post: 01-10-2014, 03:27 PM
  4. Sorting gone Wrong
    By please_help_me in forum Excel General
    Replies: 2
    Last Post: 03-30-2007, 04:48 PM
  5. whats wrong with my sorting?
    By Trisha in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 01-17-2006, 07:10 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