View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
andresg1975 andresg1975 is offline
external usenet poster
 
Posts: 60
Default create a macro that looks for data and delete row

can u help me on this:
let's say i have rows like these:
B C D E
3020 0 28TH 28TH ST

3020 0 ACME ACME AWNING

The macro should find 3020 in column B, take cells in colums B C D E in that
row and bring them one
row down, continue the same procedure over and over

thanks


"Zone" wrote:

Paste this sub into a standard module. It does not select anything,
because there is no need to. James

Sub DelRows()
Dim j As Long
For j = Cells(65536, "n").End(xlUp).Row To 1 Step -1
If Cells(j, "n") = "Balance:" Then Rows(j).EntireRow.Delete
Next j
End Sub

andresg1975 wrote:
how can i create a macro that look for cells containing "Balance:" in column
N, select cell, delete the row, continue doing the same procedure until there
are no more cells containing "Balance:" Thanks.