View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Help!! - From Brazil

If you desire to delete rows in which the value of the cell in column B is
zero then:

Sub delete_some_rows()

Dim r As Range, j As Long


Set r = ActiveSheet.UsedRange
j = r.Rows.Count + r.Row
Set rdel = Cells(j, "A")
For i = 1 To j - 1
If Cells(i, "B").Value = 0 Then
Set rdel = Union(rdel, Cells(i, "A"))
End If
Next


rdel.EntireRow.Delete


End Sub

If you desire something else, then ignore this reply.
--
Gary's Student


"Gerald" wrote:


Prezados Colegas..

Coluna A Coluna B
Item A 10
Item B 40
Item C 18
Item D 0
Item E 20
Item F 0
Item G 0

Gostaria sem utilizar VBA que ficassem assim

Coluna A Coluna B
Item A 10
Item B 40
Item C 18
Item E 20

Ou seja, que através de um comando, eu apresentasse as células somente com
valores superiores a "0".