+ Reply to Thread
Results 1 to 13 of 13

Counting to a specified numberin round, then add one to round

  1. #1
    Registered User
    Join Date
    09-09-2013
    Location
    St. John's
    MS-Off Ver
    Excel 2010
    Posts
    13

    Counting to a specified numberin round, then add one to round

    Hi everyone

    First, let me say that I am a novice user of Excel. I have attached a workbook that contains a hockey offline draft. It is done (although not the most efficient way) to suit a 12 team league. My problem is on the "Fantasy Rankings" page you can select an "Owner" and the round is supposed to say "1" for round one. Once the 12th owner has made his selection, the round in the adjacent cell should say "2", while the previous 12 selections stay at "1". Right now they all change to 2. This, of course, continues as you select more players.

    My question is, how do I keep the first 12 players selected to have a "1" in the "round" column, the next 12 to have a "2" in the round column, an so on, up to 20 in the "round" column.
    Attached Files Attached Files

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Counting to a specified numberin round, then add one to round

    Try this formula in AF2 copied down

    =IF(AE2="","",CEILING(COUNTA(AE$2:AE2)/12,1))
    Audere est facere

  3. #3
    Registered User
    Join Date
    09-09-2013
    Location
    St. John's
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Counting to a specified numberin round, then add one to round

    That is it!!! Thank you so much!

  4. #4
    Registered User
    Join Date
    09-09-2013
    Location
    St. John's
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Counting to a specified numberin round, then add one to round

    It appears that there is a little flaw with the formula. If Players are selected from Crosby (1) to Perry (11) everything works fine. But the problem arises when the 12th owner makes a selection of say, Spezza (31). This will say round 1, which is correct. But then for his next selection (the first pick of round 2) he decides to take Nash (20). The formula makes Nash round one and Spezza 2. Any further help is greatly appreciated. Thanks

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Counting to a specified numberin round, then add one to round

    If you want the order of picking to be a factor then I suspect you'll need VBA - let me ask for some assistance.......

  6. #6
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Counting to a specified numberin round, then add one to round

    McG_84,

    Right-click the tab named 'Fantasy Ranking' and select "View Code"
    Copy this code and paste it in there:
    Please Login or Register  to view this content.

    Now the round numbers should work as desired. Let me know if there are any issues.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Registered User
    Join Date
    09-09-2013
    Location
    St. John's
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Counting to a specified numberin round, then add one to round

    I tried the code but could not get it to work (again, a novice user). I'm not exactly sure what I was supposed to do. I attached the latest copy of the file I have with your code inserted. If, when I select Jason Spezza (31) for "Manager #12" it is correct in saying the round is 1. But, "Manager #12" gets the immediate next pick. He decides to choose Ryan Getzlaf (19). It still makes Getzlaf round 1 and Spezza round 2. Am I supposed to erase the formula in column F or is the code not running (I've never used code in Excel before). Thanks again. I really appreciate all this help. You guys are great!
    Attached Files Attached Files

  8. #8
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Counting to a specified numberin round, then add one to round

    Yeah, remove the formula.

  9. #9
    Registered User
    Join Date
    09-09-2013
    Location
    St. John's
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Counting to a specified numberin round, then add one to round

    Still nothing. Is the formula in F1 stopping this? When I open the workbook do I have to run anything to initiate the code? I still need a "1" or whatever in column F to show so the formula in F1 works

    I'm so close to saying this is done.

  10. #10
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Counting to a specified numberin round, then add one to round

    Alright, I looked at the new file you posted, which used different columns than the one you posted earlier. Change each instance of Columns("AE") in the code to simply Column("E"). The code was monitoring the wrong column.

  11. #11
    Registered User
    Join Date
    09-09-2013
    Location
    St. John's
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Counting to a specified numberin round, then add one to round

    I am getting something in the "E" column. Unfortunately it's a "0" and it does not go to "1" when the next round has started after I have selected the 13th person. I very much appreciate you help and patience on this topic.

  12. #12
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Counting to a specified numberin round, then add one to round

    Did you change the second instance of Columns("AE")? It's in the WorksheetFunction.Countif...

  13. #13
    Registered User
    Join Date
    09-09-2013
    Location
    St. John's
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Counting to a specified numberin round, then add one to round

    Where's the facepalm emoticon? haha. You sir, are a genius! It works! I am eternally grateful. Now I need to try and understand how the code actually works. Again, many thank yous.

+ 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. Replies: 5
    Last Post: 09-05-2013, 04:59 PM
  2. When ROUND doesnt round
    By Buckwa in forum Excel General
    Replies: 9
    Last Post: 12-18-2011, 08:31 AM
  3. Counting the non-null cells in a range with noncontinguous cells in a round-robin
    By StudentTeacher in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-08-2011, 07:28 AM
  4. VB Function Round vs Excel function Round not behaving the same Od
    By Bud in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-18-2006, 12:45 AM
  5. [SOLVED] How do I ROUND() round off decimals of a column dataset?
    By Højrup in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-12-2005, 07:06 AM

Tags for this Thread

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