+ Reply to Thread
Results 1 to 8 of 8

Help creating a loop

  1. #1
    Registered User
    Join Date
    12-11-2013
    Location
    auckland
    MS-Off Ver
    Excel 2010
    Posts
    56

    Exclamation Help creating a loop

    Hi there i have a code that only a certain part needs looping here is the code:

    Please Login or Register  to view this content.
    (Loop ends here!)


    End Sub[/CODE]


    I need the loop to continue until there is no more data in column b or until this cell is empty on the second to last line:

    Please Login or Register  to view this content.

    Thanks

  2. #2
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Help creating a loop

    Hi,

    can you include a copy of your workbook. it will be easier to debug. Also can you explain what your macro do?

    Thanks

  3. #3
    Registered User
    Join Date
    12-11-2013
    Location
    auckland
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Help creating a loop

    i cant include it sorry but what it does is its taking data in blocks of 24 going down and moving it into one long continuous graph.

    the code works fine i just need the second part of it to loop until it comes across no more data in column b

  4. #4
    Registered User
    Join Date
    12-11-2013
    Location
    auckland
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Help creating a loop

    here is an edit to the code:

    Please Login or Register  to view this content.

    as you can see i have copied the last part instead of a loop. that is the part to loop until no more data can be found on sheet "tabelle1"

  5. #5
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Help creating a loop

    Maybe this
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    12-11-2013
    Location
    auckland
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Help creating a loop

    That worked a charm!! Thank you very much!! If possible could you please elaborate on what tha final line actually is saying?

    Please Login or Register  to view this content.

  7. #7
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Help creating a loop

    It's checking whether pressing Ctrl + down arrow from the activecell goes to the last row of the worksheet. If it does, meaning there are no more data below, at least not for that particular column.

  8. #8
    Registered User
    Join Date
    12-11-2013
    Location
    auckland
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Help creating a loop

    Thank you so much A+++++++++!

+ 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. [SOLVED] Creating a Loop
    By Jietoh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-03-2013, 11:55 AM
  2. [SOLVED] Help with creating a loop within vba
    By christopherjward in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2013, 07:05 PM
  3. Creating a loop
    By ChrisKader in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-14-2010, 10:27 PM
  4. Excel 2007 : Help Creating a Loop
    By enhydra in forum Excel General
    Replies: 7
    Last Post: 12-20-2009, 11:30 AM
  5. Need help Creating a Loop
    By built_by_stilt in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-21-2005, 02:36 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