Thread: Macro If And
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Herve_Rob[_3_] Herve_Rob[_3_] is offline
external usenet poster
 
Posts: 1
Default Macro If And


Hi
anyone to help me on this ?

I have done this macro to delete the rows where in Colomn D = Heater.


Dim HTRCell As Range
Dim rngHTR As Range
Dim rngHTRCell As Range

Do
Set HTRCell = Cells(Rows.Count, "D").End(xlUp)
Set rngHTR = Range("D5", HTRCell)
Set rngHTRCell = rngHTR.Find("Heater")

If rngHTRCell Is Nothing Then
Exit Do
Else
Rows(rngHTRCell.Row).Delete
End If
Loop
End Sub

I would like to modify that condition as:
if D=Heater (as above) *and* B = blank value the delete row D

Regards
Herv

--
Herve_Ro
-----------------------------------------------------------------------
Herve_Rob's Profile: http://www.excelforum.com/member.php...fo&userid=3520
View this thread: http://www.excelforum.com/showthread.php?threadid=55006