+ Reply to Thread
Results 1 to 2 of 2

Loop keeps running

  1. #1
    Registered User
    Join Date
    12-20-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    16

    Loop keeps running

    Hi Guys,

    My below code seems to keep looping/running, and I can't figure out why.

    Range("H2").Select

    Do Until ActiveCell.Offset(0, -7) = "" And _
    ActiveCell.Offset(0, -6) = "" And _
    ActiveCell.Offset(0, -5) = "" And _
    ActiveCell.Offset(0, -4) = "" And _
    ActiveCell.Offset(0, -3) = "" And _
    ActiveCell.Offset(0, -2) = "" And _
    ActiveCell.Offset(0, -1) = ""

    If ActiveCell.Value <> "" And ActiveCell.Offset(0, -1).Value = "" Then
    ActiveCell.Offset(0, -1).Value = ActiveCell.Value
    ElseIf ActiveCell.Value <> "" And ActiveCell.Offset(0, -1).Value <> "" Then
    ActiveCell.Offset(0, -1).Value = ActiveCell(0, -1).Value & " & " & ActiveCell.Value
    Else
    ActiveCell.Offset(1, 0).Select
    End If


    Loop

    - James

  2. #2
    Registered User
    Join Date
    12-20-2016
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    16

    Re: Loop keeps running

    Nevermind, figured it out

+ 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] Running a For Loop within another For Loop
    By ATLGator in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 01-22-2014, 12:59 PM
  2. [SOLVED] Running Loop in an Array
    By Jiptastic in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-20-2014, 06:15 PM
  3. [SOLVED] Loop not running on all worksheets
    By usmc1sok in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 09-12-2013, 01:12 PM
  4. [SOLVED] Loop running slow
    By Sean Thomas in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-14-2013, 04:49 AM
  5. If Valua A = Value B... If Value C = Value A without running through first loop...
    By ThomasCarter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-18-2012, 01:25 PM
  6. Do loop not running
    By hattrick_123a in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-21-2011, 08:36 PM
  7. Loop not running
    By T De Villiers in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2006, 10:26 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