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 |
Hi
is there any logic HOWE you determine this range. A better way might be using SUMPRODUCT with multiple crieria. "Jurry" wrote: 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 |
All times are GMT +1. The time now is 05:41 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com