Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Countif Conditions - Use of conditions that vary by cell value JonTarg Excel Discussion (Misc queries) 1 May 30th 08 01:21 PM
COUNTIF with two conditions Jaydubs Excel Discussion (Misc queries) 3 July 19th 06 10:28 AM
CountIF on two conditions Darin Kramer Excel Programming 3 June 17th 05 11:46 PM
COUNTIF for 2 conditions Bruce Excel Worksheet Functions 4 June 15th 05 01:22 PM
How can I use COUNTIF to sum for two conditions? Jeff Excel Worksheet Functions 4 December 30th 04 05:25 AM


All times are GMT +1. The time now is 12:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"