+ Reply to Thread
Results 1 to 6 of 6

loop that stops when certain value is obtained

  1. #1
    Registered User
    Join Date
    03-07-2013
    Location
    London
    MS-Off Ver
    Excel 2009
    Posts
    3

    loop that stops when certain value is obtained

    I require a loop that calculates the values in successive rows until a certain value is reached in one of the cells in a row. Thank you.

  2. #2
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: loop that stops when certain value is obtained

    You're welcome. We require a lot more information than that to offer anything specific.

  3. #3
    Registered User
    Join Date
    03-07-2013
    Location
    London
    MS-Off Ver
    Excel 2009
    Posts
    3

    Re: loop that stops when certain value is obtained

    I am writing a macro for a loan schedule that must end when the loan has been cleared (i.e the value of the ending balance is 0) How do I write a macro using a loop that stops when this occurs, but the range of the cells is unknown. I hope this helps, if any more info is required please feel free to ask

  4. #4
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: loop that stops when certain value is obtained

    Picture yourself looking at a spreadsheet you've never seen before... what questions would you ask? If you're not going to upload a sample workbook to show us, you have to describe it all. We don't know anything yet.

  5. #5
    Registered User
    Join Date
    03-07-2013
    Location
    London
    MS-Off Ver
    Excel 2009
    Posts
    3

    Re: loop that stops when certain value is obtained

    Here is the code I am attempting to use:
    Please Login or Register  to view this content.
    But an error message keeps showing up when the code is run. Hope you can help. Thanks
    Last edited by JBeaucaire; 03-07-2013 at 10:39 PM. Reason: Added code tags, as per forum rules. Don't forget!

  6. #6
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: loop that stops when certain value is obtained

    Assuming your lines of code are controlling the value of "x"

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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