![]() |
Help!! - From Brazil
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". |
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". |
Help!! - From Brazil
Public Sub ProcessData()
Dim iLastRow As Long Dim i As Long iLastRow = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To iLastRow If Cells(i,"A").Value = 0 Then Rows(i).Delete End If Next i End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Gerald" wrote in message ... 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". |
All times are GMT +1. The time now is 03:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com