+ Reply to Thread
Results 1 to 11 of 11

Macro that ranks times .

  1. #1
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    446

    Red face Macro that ranks times .

    Hello all ,

    I have this macro that looks at cols BJ BL BN and should be finding the lowest time . I have done race 6 .
    It doesn’t and im not sure why .

    The macro works great with numbers or even decimal places .

    Im guessing its not recognising the times in this format .

    Once it finds the lowest time that horse gets ranked 1 , then finds next lowest different horse .
    Once a horse is ranked the macro will not look at that horse again at all .

    Sometimes there are cells with no times at all .

    Any ideas would be great .

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Macro that ranks times .

    Your times are not actual times, they are text strings. You will need to use proper times to perform any kind of ranking / calculation on them.

    They should be entered as m:ss.00 not m.ss.00

  3. #3
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    446

    Re: Macro that ranks times .

    Ok , thanks for that .

  4. #4
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    446

    Re: Macro that ranks times .

    In this version 2 sheet i would like to get a macro that can change all the times in col AN to m:ss.00 as mentioned by jason.b75 .

    I tried manually but answer does not remain the same .

    I have 460,000 rows and a function will be better than nothing .

    Thanks .
    Attached Files Attached Files
    Last edited by I need excel help; 03-17-2019 at 04:08 PM. Reason: forgot sheet .

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Macro that ranks times .

    Enter this formula in BP2 and fill down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Either use the new column for any additional formulas or copy the results and use PasteSpecial - Values to overwrite the original time column, if you do this you can then delete the formulas.

  6. #6
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    446

    Re: Macro that ranks times .

    Thanks again , this function is now rounding as in this sheet enclosed .
    Thanks .
    Attached Files Attached Files

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Macro that ranks times .

    Why do you feel you need a macro for this? A formula will do it just as well.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    446

    Re: Macro that ranks times .

    Im open to any answers as i cant get the format jason.b75 mentioned . The function is not giving me the exact same result i have in col AN with the new :::: , etc .
    Thanks .

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Macro that ranks times .

    yes, it is, you just need to adjust the formatting
    mm:ss.000

    Even though it is only showing 00:35.7, the underlying have has all the decimals - it is only displaying to 1 decimal place

  10. #10
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    446

    Re: Macro that ranks times .

    Ok , i just found where i should change the formatting to get mm:ss.000

    I am grateful for your imput .


    Thanks .
    Last edited by I need excel help; 03-18-2019 at 02:08 AM. Reason: found solution .

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Macro that ranks times .

    Happy to help and thanks for the feedback

+ 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. If a search term can be found 1 time, 2 times 3 times 4 times 5 times
    By excelcandy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2013, 09:57 PM
  2. [SOLVED] Macro which ranks variables along with appended data
    By buntalan80 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-08-2013, 08:38 PM
  3. Macro Loop – Find Specific Times, Extract Date, Average Values of Times
    By ExcelQuestFL in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-25-2010, 02:50 PM
  4. Macro which ranks table of data
    By dandavis1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-07-2008, 04:41 AM
  5. Macro to help sort date - times and average similar times.
    By ferretydeath in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2008, 05:44 PM
  6. [SOLVED] Sum of ranks
    By Vasant Nanavati in forum Excel Formulas & Functions
    Replies: 42
    Last Post: 09-06-2005, 07:05 AM
  7. Sum of ranks
    By Tim Otero in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 09-06-2005, 06:05 AM
  8. Sum of ranks
    By Tim Otero in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-05-2005, 11:05 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