View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Andrew Taylor Andrew Taylor is offline
external usenet poster
 
Posts: 225
Default countif (2) conditions

One way:

If Application.WorksheetFunction.CountIf(.Rows(Lrow), "High") _
+ Application.WorksheetFunction.CountIf(.Rows(Lrow), "Low") _
= 0 Then .Rows(Lrow).Delete




saziz wrote:
Hi,
I am trying to give 2 conditions in the following line in my code it
doesn't
work. Can someone help me with the syntax please?
If I give one condition (high or low) it works. But I need to save both
high & low.


If Application.WorksheetFunction.CountIf(.Rows(Lrow), "High" And
"Low") = 0 Then .Rows(Lrow).Delete



Thank you
Saziz


--
saziz
------------------------------------------------------------------------
saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350
View this thread: http://www.excelforum.com/showthread...hreadid=573964