Thread
:
create a macro that looks for data and delete row
View Single Post
#
5
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
create a macro that looks for data and delete row
One line or as shown here add
end if
before next c
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Don Guillett" wrote in message
...
For Each c In Range("N1:N" & cells(rows.count).End(xlUp).Row)
'below is ONE line
If c.Value = "Balance" Then
range(cells(c.row,"b"),cells(c.row,"z")).ClearCont ents
Next c
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"James" wrote in message
...
Paul,
Is it possible for you to tell me if rather than deleting the entire row,
to
delete the values in columns?
i.e. I want to delete the values in a row but maintain a formula that is
in
Column A. Delete values in columns B through to ...)
Thanks
James
--
J
"PCLIVE" wrote:
You can start with something like this and then sort your data.
For Each cell In Range("N1:N" & Range("N65536").End(xlUp).Row)
If cell.Value = "Balance" _
Then
cell.EntireRow.ClearContents
Else:
End If
Next cell
Regards,
Paul
"andresg1975" wrote in message
...
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.
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett