"delete" function

  • Thread starter Thread starter deb
  • Start date Start date
D

deb

I want to be able to delete an entire row, if a certain
cell within the row comes up with a certain value.

Example:
IF(B12="NA",DELETE12:12)

Is there a "delete" function or something that can do this?
Thanks!
 
I can't think of a way to do it wit out code, but with
code is fairly easy:

right click on the sheet where you want this condition to
happen, click on view code, and paste this lines there:

Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
If UCase(Range("B12").Value) = "NA" Then Range
("b12").EntireRow.Delete
End Sub

This will delete the entire row 12 every time theres an NA
on B12...

Cheers,
Juan
 
Back
Top