Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following Module:
Sub DelEmptyRow() Rng = Selection.Rows.Count ActiveCell.Offset(0, 0).Select Application.ScreenUpdating = False For i = 1 To Rng If ActiveCell.Value = 0 Then 'You can replace "" with 0 to delete rows with 'the value zero Selection.EntireRow.Delete ElseIf ActiveCell.Value = "Company" Then Selection.EntireRow.Delete ElseIf ActiveCell.Value = "Controlling Area :" Then Selection.EntireRow.Delete ElseIf ActiveCell.Value = "Proj. number" Then Selection.EntireRow.Delete Else ActiveCell.Offset(1, 0).Select End If Next i End Sub What can I add so I don't have to select the data and use a pre determined range of "A8:Z300" as the selection set. Also is there a way to make the code smaller? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change Preset Columns | Excel Discussion (Misc queries) | |||
preset table | Excel Programming | |||
Clear cells to a preset value | Excel Worksheet Functions | |||
Clear cells to a preset value | Excel Worksheet Functions | |||
Is there anyway to add more than the preset 265 columns in Excel? | Excel Discussion (Misc queries) |