Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for Deleting rows with balnk cell
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for Deleting rows with balnk cell
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.Cou nt 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for Deleting rows with balnk cell
Turn on macro recorder.
Select column A and F5SpecialBlanksOK EditDelteEntire 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 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for Deleting rows with balnk cell
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro for deleting rows and serialising the remaing rows | Excel Programming | |||
Macro for deleting rows and serialising the remaing rows | Setting up and Configuration of Excel | |||
Macro for deleting rows and serialising the remaing rows | Excel Worksheet Functions | |||
Macro Help Needed: Comparing cell values and deleting rows | Excel Discussion (Misc queries) | |||
Macro Help for Deleting Blank Rows & Clearing Cell Contents | Excel Programming |