Thread: Re Countif
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Martin Wheeler Martin Wheeler is offline
external usenet poster
 
Posts: 57
Default Re Countif

xl2003
I am trying to count the number of instances in range L7:Q12 in which the L
cell is < 0 and the Q cell <= 4, as in

A = Application.WorksheetFunction.CountIf(.Range("L7:L 12"), "< 0")
B = Application.WorksheetFunction.CountIf(.Range("Q7:Q 12"), "< = 4")

I am trying to 'combine' the above 2 functions like you can in excel, as in

A = Application.WorksheetFunction.CountIf(CountIf(.Ran ge("L7:L12"), "<
0"),CountIf(.Range("Q7:Q12"), "<= 4"))

but is does not like the first CountIf.

Any help would be greatly appreciated

Ta,
Martin