+ Reply to Thread
Results 1 to 2 of 2

Remove Blank Lines

  1. #1
    Nigel
    Guest

    Remove Blank Lines

    I have a spreadsheet where I am comparing 2 cells, the result is placed in
    Cell AQ, if the value in that cell is 0, I would like the row to be deleted,

    How would I achieve this

    Thanks

  2. #2
    Tom Ogilvy
    Guest

    Re: Remove Blank Lines

    Sub DeleteZeros()
    Dim rw as Long, i as Long, rng as Range
    set rw = cells(row.count,"AQ").end(xlup)
    for i = rw to 1 step -1
    set rng = cells(i,"AQ")
    if rng <> "" then
    if rng.Text = "0" then
    rng.EntireRow.delete
    end if
    end if
    Next
    End Sub


    --
    Regards,
    Tom Ogilvy


    "Nigel" <[email protected]> wrote in message
    news:[email protected]...
    > I have a spreadsheet where I am comparing 2 cells, the result is placed in
    > Cell AQ, if the value in that cell is 0, I would like the row to be

    deleted,
    >
    > How would I achieve this
    >
    > Thanks




+ Reply to Thread

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