ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   variable range countif (https://www.excelbanter.com/excel-worksheet-functions/5576-variable-range-countif.html)

JK

variable range countif
 
I am wondering of there is a way to allow the range in countif to vary. I am
trying to make an analysis template that the user can specify the range
without having to go into the cell and re-specify it in the coutif funciton.
Is this possible? Or am I barking up the wrong tree?
Thanks.
-JK

Aladin Akyurek


JK Wrote:
I am wondering of there is a way to allow the range in countif to vary.
I am
trying to make an analysis template that the user can specify the
range
without having to go into the cell and re-specify it in the coutif
funciton.
Is this possible? Or am I barking up the wrong tree?
Thanks.
-JK


Care to elaborate what you would want to have?


--
Aladin Akyurek
------------------------------------------------------------------------
Aladin Akyurek's Profile: http://www.excelforum.com/member.php...fo&userid=4165
View this thread: http://www.excelforum.com/showthread...hreadid=274791


Biff

Hi!

Assume you want to count a variable range in column A.
Assume the range starts in A1 and your users can specify
the end of the range by entering a value in a cell, say
E1. In E1 you enter 10. The countif range will be A1:A10.

=COUNTIF(INDIRECT("A1:A"&E1),"whatever")

You can specify both the starting cell of the range and
the end of the range. D1 = 5, E1 = 10. The countif range
would be A5:A10:

=COUNTIF(INDIRECT("A"&D1&":A"&E1),"whatever")

Biff

-----Original Message-----
I am wondering of there is a way to allow the range in

countif to vary. I am
trying to make an analysis template that the user can

specify the range
without having to go into the cell and re-specify it in

the coutif funciton.
Is this possible? Or am I barking up the wrong tree?
Thanks.
-JK
.


Arvi Laanemets

Hi

=COUNTIF(INDIRECT(A1),ValueToCount)
where cell A1 contains the reference string - like "X1:X100"


--
Arvi Laanemets
(When sending e-mail, use address arvil<Attarkon.ee)


"JK" wrote in message
...
I am wondering of there is a way to allow the range in countif to vary. I

am
trying to make an analysis template that the user can specify the range
without having to go into the cell and re-specify it in the coutif

funciton.
Is this possible? Or am I barking up the wrong tree?
Thanks.
-JK





All times are GMT +1. The time now is 01:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com