View Single Post
  #1   Report Post  
Jurry
 
Posts: n/a
Default Countif & ranges consisting of multiple areas


I would like to use the COUNTIF function with a range which consists of
multiple areas (which are determined during runtime of a VBA script) as
in the following example:

testrange=A1:A3,A5:A6 <- Determined during runtime!
B1=COUNTIF (testrange,"5")

The above does not work. Does anyone have a workaround?

Thanks in advance,
Jurry.


--
Jurry
------------------------------------------------------------------------
Jurry's Profile: http://www.excelforum.com/member.php...fo&userid=8664
View this thread: http://www.excelforum.com/showthread...hreadid=278230