Dave: Question about Find/Delete Row and Row Above


Posted by Pankaja Narayanan on May 11, 2001 6:35 AM

Hello Dave,

I want to use the Macro you wrote to "Find/Delete Row and Row Above". But I want the macro to delete only cells in the column with #REF and not the row above. Can you modify your the macro for me? Thank you very much.

Pankaja

Posted by Ed on May 11, 2001 9:14 AM


Pankaja,

Daves macro works like a charm! I do have an add-in for conditional row delete. this works great for what you want to do. I do not know if I can attach a file here, but you can email me and I will send a reply with the file.

Thanks,

Ed
eslaski@victaulic.com

Posted by Dave Hawley on May 13, 2001 4:34 PM


Hi Pankaja

Try this one.


Sub DeleterefRows()
'Written by OzGrid Business Applications
'www.ozgrid.com

Dim rRows As Range
Dim rCells As Integer
Dim i As Integer

Application.ScreenUpdating = False
Set rRows = Selection.EntireColumn

For i = 1 To WorksheetFunction.CountIf(rRows, "#REF!")
rRows.Find(What:="#REF!").EntireRow.Delete
Next i

Set rRows = Nothing
Application.ScreenUpdating = True
End Sub


Dave


OzGrid Business Applications



Posted by Pankaja Narayanan on May 14, 2001 5:04 AM

Hello Dave,

THANKS A LOT FOR SENDING ME THE MODIFIED MACRO FOR "FIND/DELETE ROW AND ROW ABOVE"

Pankaja