پاک کردن ردیف های خالی

Collapse
X
 
  • زمان
  • نمایش
حذف همه
new posts
  • ali.b

    • 2014/01/12
    • 798

    پاک کردن ردیف های خالی

    با سلام
    با این کد می تونین ردیف های خالی رو حذف کنین
    کد:
    Sub DeleteEmptyRows()
    '
    'This macro will delete all rows, which are missing data in a 
    'particular column, underneath and including the selected cell.
    '
    Dim Counter
    Dim i As Integer
    Counter = InputBox("Enter the total number of rows to process")
    ActiveCell.Select
    For i = 1 To Counter
    If ActiveCell = "" Then
    Selection.EntireRow.Delete
    Counter = Counter - 1
    Else
    ActiveCell.Offset(1, 0).Select
    End If
    
    Next i
    End Sub

Working...