Countif & ranges consisting of multiple areas

J

Jurry

I would like to use the COUNTIF function with a range which consists o
multiple areas (which are determined during runtime of a VBA script) a
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
 
F

Frank Kabel

Hi
is there any logic HOWE you determine this range. A better way might be
using SUMPRODUCT with multiple crieria.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top