countif (2) conditions
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 |
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 |
countif (2) conditions
Andrew, Thank you for the help. Regards Sazi -- sazi ----------------------------------------------------------------------- saziz's Profile: http://www.excelforum.com/member.php...nfo&userid=635 View this thread: http://www.excelforum.com/showthread.php?threadid=57396 |
countif (2) conditions
Andrew, Thank you for the help. Regards Saziz -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=573964 |
countif (2) conditions
Andrew, Thank you for the help. Regards Saziz -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=573964 |
countif (2) conditions
Andrew, Thank you for the help. Regards Saziz -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=573964 |
All times are GMT +1. The time now is 12:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com