Prev: Copy/Paste cells containing only numbers with .50 in it
Next: List Open Workbooks In All Excel Instances?
From: Radhakant Panigrahi on 2 Jun 2010 11:00 Hi, i have several data in a sheet with data in 10 columns... in column A there are cells where it is blank and i want to delete the rows where there is blank cell in column A.. I need the vba macro for this regards, radha
From: Ron de Bruin on 2 Jun 2010 11:05 Try Sub DeleteBlankRows_2() 'This macro delete all rows with a blank cell in column A 'If there are no blanks or there are too many areas you see a MsgBox Dim CCount As Long On Error Resume Next With Columns("A") ' You can also use a range like this Range("A1:A8000") CCount = .SpecialCells(xlCellTypeBlanks).Areas(1).Cells.Count If CCount = 0 Then MsgBox "There are no blank cells" ElseIf CCount = .Cells.Count Then MsgBox "There are more then 8192 areas" Else .SpecialCells(xlCellTypeBlanks).EntireRow.Delete End If End With On Error GoTo 0 End Sub -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm
From: Gord Dibben on 2 Jun 2010 11:29 Turn on macro recorder. Select column A and F5>Special>Blanks>OK Edit>Delte>Entire row. The recorder gives you this. Selection.SpecialCells(xlCellTypeBlanks).Select Selection.EntireRow.Delete Gord Dibben MS Excel MVP On Wed, 2 Jun 2010 08:00:01 -0700, Radhakant Panigrahi <rkp.gen(a)gmail.com> wrote: >Hi, > >i have several data in a sheet with data in 10 columns... > >in column A there are cells where it is blank and i want to delete the rows >where there is blank cell in column A.. >I need the vba macro for this > >regards, >radha
From: Ron de Bruin on 2 Jun 2010 15:03
For the OP I suggest to use more code then the macro recorder create See my reply And see why here http://www.rondebruin.nl/specialcells.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm |