Results 1 to 11 of 11

Macro to delete rows with a Zero value. Macro seems to be in continual loop

Threaded View

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2007
    Posts
    5

    Macro to delete rows with a Zero value. Macro seems to be in continual loop

    Hi all,

    As part of a macro i have created- I inserted a piece of code that I drafted from another forum:


    Dim LR As Long, i As Long
        LR = Range("B" & Rows.Count).End(xlUp).Row
        For i = LR To 1 Step -1
        If Range("B" & i).Value = 0 Then Rows(i).Delete
        Next i
    I thought I would be able to just copy and paste it into my VBA code but it has cause my macro to get stuck and not finish.

    I have attached the entire macro code if this is required.
    Any legend out there have any ideas?

    Thanks.
    J
    Attached Files Attached Files
    Last edited by arlu1201; 08-07-2012 at 02:41 PM.

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