Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows ere first cell is blank but ohters celld have data?
HI,
I was wondering if there is Macro for this. I have a spreadsheet were the soardically throughout column a the first cell is blank (the rest of the row has Data but I don't need it. Does some one have a macro that will search for these cells and delete the row? Thanks Mascot |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete rows ere first cell is blank but ohters celld have data?
I happened to be here yesterday.
http://www.angelfire.com/biz7/julian...ans_macros.htm First select all the cells in the column Sub DelEmptyRow() Dim rng As Integer Dim i As Integer rng = Selection.Rows.Count ActiveCell.Offset(0, 0).Select Application.ScreenUpdating = False For i = 1 To rng If ActiveCell.Value = "" Then 'You can replace "" with 0 to delete rows with 'the value zero Selection.EntireRow.Delete Else ActiveCell.Offset(1, 0).Select End If Next i Application.ScreenUpdating = True End Sub Mascot wrote: HI, I was wondering if there is Macro for this. I have a spreadsheet were the soardically throughout column a the first cell is blank (the rest of the row has Data but I don't need it. Does some one have a macro that will search for these cells and delete the row? Thanks Mascot -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200607/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to delete rows if cell blank in column | Excel Discussion (Misc queries) | |||
Macro to delete blank rows in a data range | Excel Discussion (Misc queries) | |||
Delete multiple rows where a blank cell is located | Excel Discussion (Misc queries) | |||
How do I delete blank rows (rows alternate data, blank, data, etc | Excel Discussion (Misc queries) | |||
To delete rows when more than one cell is blank | Excel Worksheet Functions |