+ Reply to Thread
Results 1 to 7 of 7

Loop error

  1. #1
    Registered User
    Join Date
    06-08-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    20

    Loop error

    I'm not gonna bore you with what I'm doing, namely because I want to try to figure out as much as possible on my own, but this loop error is driving me crazy.

    I am getting this error that says...

    Compile error:
    Loop without Do

    But I have a Do at the very beginning and a "Loop until" at the end (just before the End Sub). There are no other Dos or Loops. So this bugger is preventing me from testing the code to see where any other errors are.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Loop error

    Hi, OreEle,

    End With, End If, Next is missing but that´s inside the code you´re not showing. And we won´t bother you with guesses on that (short on knowledge of your code).

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    06-08-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Loop error

    Here's what I got



    Please Login or Register  to view this content.
    Last edited by OreEle; 06-01-2013 at 01:41 PM. Reason: Following rules formating

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Loop error

    Hi, OreEle,

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code in [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    Maybe you should elaborate what you intend to do rather than post code which maybe will not do what you want it to do? And I doubt that a "yes" could be of much use in a calulcation like yours (eCell).
    Please Login or Register  to view this content.
    Ciao,
    Holger

  5. #5
    Registered User
    Join Date
    06-08-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Loop error

    Thank you for reminding me about the proper format.

    Basically, what I'm trying to do is create an ELO macro for teams. On another forum that I'm on, we play a team game called "Mafia" where each player is either part of the "mafia" or the "town." I have an ELO macro that is designed for one on one debates, but I'm trying to twist it for teams.

    Sheet2 is where each person's name and individual ELO score is stored (data should be pulled and updated in this sheet, but nothing ever deleted), names in Column A and scores in Column B
    Sheet3 is where the teams are shown and Team ELO scores are calculated. This is all done in cell functions, nothing in macros (I may try to update that later, so there is less user entry needed)
    Sheet1 is the macro gets its data to update. It has the individual name, their team score, the opposing scores and if they won or not. The macro should take that info, process the new scores, update those scores, then delete that line in Sheet1 and move to the next line and repeat (until all lines have been completed).

    The eCell is supposed to be a "yes" or "no" for if that player's team won the game. If "yes" we run through one equation (that raises the score) if "no" we run through a different equation that lowers there score. The gCell and hCell are to be used if eCell is "no". They are not added into the code because I wanted to test it with just "yes" to see if everything else was working.

  6. #6
    Registered User
    Join Date
    06-08-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Loop error

    Anyone else have any ideas that might help?

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Loop error

    Hi, OreEle,

    could you please attach a sample workbook with some data to play with and show the situation as is and as wanted? I think that would make it easier to understand what the code really is supposed to do (at least for me).

    Ciao,
    Holger

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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