Results 1 to 7 of 7

IF statement does not stop correctly

Threaded View

heathb IF statement does not stop... 08-22-2013, 07:41 AM
AB33 Re: IF statement does not... 08-22-2013, 07:59 AM
AB33 Re: IF statement does not... 08-22-2013, 08:00 AM
heathb Re: IF statement does not... 08-22-2013, 09:19 AM
JasperD Re: IF statement does not... 08-22-2013, 09:30 AM
heathb Re: IF statement does not... 08-22-2013, 11:05 AM
millz Re: IF statement does not... 08-22-2013, 11:09 AM
  1. #1
    Registered User
    Join Date
    05-10-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    68

    IF statement does not stop correctly

    Hi all

    I was recently given the below code which seemed to work correctly, but unfortunately it does not stop when it comes to the field "lost clients". It carries on rather than stepping to the next piece of code. I have tried multiple times to fix this myself, but as usual failed. All help appreciated.
    Thank you

    Sheets("exempt final").Select
        
    lr = Cells(Rows.Count, 1).End(xlUp).Row
    For i = 1 To lr
        If Cells(i, 1).Value = "LOST CLIENTS" Then
        
       
      '  End If
        
           
        Else
            If Cells(i, 3).Value <> "" Then
                ' Do Nothing
            Else
                Cells(i, 3).Value = Cells(i - 1, 3).Value
            End If
          
        End If
        
    Next i
    Last edited by jeffreybrown; 08-22-2013 at 07:45 AM. Reason: added code tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. If Or Statement not functioning correctly
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2012, 08:08 PM
  2. Why isn't this if statement functioning correctly?!?
    By rmar2011 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-29-2011, 07:31 AM
  3. If statement not adding up correctly
    By sted999 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-19-2010, 10:54 AM
  4. Replies: 0
    Last Post: 05-17-2005, 05:49 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