Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Meenachi Suppiah   on Feb 02 In MS Office Category.

  
Question Answered By: Helga Miller   on Feb 02

Find the answer below

Sub OM()
Dim lastrow As Integer
Dim lastcol As Integer

Worksheets("Sheet1").Activate
lastrow = Range("a65536").End(xlUp).Row
lastcol = 9 'because you are sure it is 9

Count = lastrow
i = 1
While (lastrow <> 0)
If (Range("A" & i) = 0 And Range("B" & i) = 0 And Range("C" & i)
= 0 And Range("D" & i) = 0 And Range("E" & i) = 0 And Range("F" & i)
= 0 And Range("G" & i) = 0 And Range("H" & i) = 0 And Range("I" & i)
= 0) Then
Range("A" & i).Select
Selection.EntireRow.Delete shift:=xlUp
End If
i = i + 1
lastrow = lastrow - 1
Wend
End Sub

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 


Tagged: