View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Macro to delete specific rows

the problem i am having is the spreadsheet will have
several occurances, not in any order. how do i set a range
to delete any row with that occurance?
i appreciate your patience. I am still learning macros and
VBA.
Thanks,
Steve
-----Original Message-----
Do you mean you want to delete row 3 or column B?

Try something like:

Sub deleteRow()

If InStr(Range("B3"), "WX") Then
Rows(3).Delete
End If

End Sub

"Steve" wrote in

message
...
I am looking for a macro to delete an entire row, when
there is a specific occurance in a cell. For instance,

if
cell b3 has the letters WX in it. I want to delete all

of
row b.

I appreciate all your time and effort.
Steve



.