+ Reply to Thread
Results 1 to 11 of 11

Ratio percentage macro resulting incorrectly.

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

    Ratio percentage macro resulting incorrectly.

    Hello all,

    The macro in this sheet named Staticfmv3Ratio3 was originally written to result a percentage number based on there number of starts wins (1sts), and placings <=4.

    Cols BJ:Bl is last 3 starts only.
    The original macro used to pick up col AP. I have tried to change this version to pick up col K now.

    Clearly I have something wrong and my adaptation is not correct and resulting wrong results in cols W and X.

    I have resulted the first 7x rows in cols BN and BO to show correct results. I have nearly 600,000 rows to process. Every name is different.

    Basic calculations, 100 divided by number of starts times all 1st places for col W.
    Basic calculations, 100 divided by number of starts times all places less than and equal to four, for col X.

    Thanks.
    Attached Files Attached Files
    I am grateful for all answers to my questions .
    Also i give a reputation even if not answered .

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,530

    Re: Ratio percentage macro resulting incorrectly.

    Administrative Note:

    Is your forum profile showing the Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: Ratio percentage macro resulting incorrectly.

    I have mentioned I'm using version 2016 in my posts.
    MS-Off Ver
    Ms Office 2016
    Thanks.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2407 (Windows 11 23H2 64-bit)
    Posts
    83,530

    Re: Ratio percentage macro resulting incorrectly.

    Just checking, as it's an old version.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,692

    Re: Ratio percentage macro resulting incorrectly.

    in W2

    =IF(K2=0,0,ROUNDDown(COUNTIF(BJ2:BL2,1)/K2*100,1))

    in X2

    =IF(K2=0,0,ROUNDDown(COUNTIFS(BJ2:BL2,""<=4"")/K2*100,1)
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  6. #6
    Registered User
    Join Date
    02-12-2024
    Location
    Australia
    MS-Off Ver
    365
    Posts
    42

    Re: Ratio percentage macro resulting incorrectly.

    Try this;
    Please Login or Register  to view this content.

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

    Re: Ratio percentage macro resulting incorrectly.

    Thanks, Eaza Goodun, that's a perfect result for me, great that I can add extra cols and widen the range in the macro. Thanks for your help, reputation coming.

    John, your col W function works, but not the 2nd col X function. Not sure where I'm going wrong there.
    Thanks.
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,692

    Re: Ratio percentage macro resulting incorrectly.

    Nothing wrong with Column X results

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

    Re: Ratio percentage macro resulting incorrectly.

    I must have a problem my end. Thanks, John, for the two functions you have provided.

    Also, thanks again to Eeza Goodun for the macro.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,692

    Re: Ratio percentage macro resulting incorrectly.

    You're welcome: glad you have it resolved.

    And thanks for the rep.

  11. #11
    Registered User
    Join Date
    02-12-2024
    Location
    Australia
    MS-Off Ver
    365
    Posts
    42

    Re: Ratio percentage macro resulting incorrectly.

    Thanks also for the feedback/rep.

+ 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. Formula to get percentage ratio of two numbers
    By HombreUno in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-01-2018, 06:20 PM
  2. [SOLVED] Ratio/Percentage of column
    By jthomas6528 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-19-2017, 05:22 PM
  3. Percentage with drop in number in same ratio
    By jhajee in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-24-2015, 07:19 AM
  4. Different Percentage value for each field resulting in one total.
    By mlivsey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-26-2012, 07:07 AM
  5. Convert Ratio Value to Percentage Value
    By harishs in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-15-2011, 10:06 AM
  6. Showing Ratio/Percentage on an Excel Chart
    By elionn in forum Excel General
    Replies: 3
    Last Post: 10-25-2011, 06:16 AM
  7. determine ratio or percentage?
    By pinchrx in forum Excel General
    Replies: 2
    Last Post: 12-27-2010, 12:57 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