variable range countif

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
JK said:
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?
 
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
 
Hi

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

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

Similar Threads

Excel Need Countifs Formula Help 0
COUNTIF & Dates 0
Counting cells in a selectable date range 0
Multiple arguments 1
Countif on Range 5
Formulaic range with CountIf 6
Excel Named Ranges and Conditional Format 3
Duplication of Counts 2

Back
Top