incremenT CountIF Value

  • Thread starter Thread starter infojmac
  • Start date Start date
I

infojmac

Hi,

i have the following COUNTIF formula - the range stays the same but th
value its searching for changes each time going up to 100 - i don'
really want to type in 1 -100 in my seperate count if functions i
there a better way?

Many Thanks

=COUNTIF(A:A,"1")
=COUNTIF(A:A,"2")
=COUNTIF(A:A,"3"
 
Assuming your values are actually numeric (in which case you don't need
the quotes):

If your COUNTIFs start in Row 1:

=COUNTIF(A:A,ROW())

If they start in Row 2:

=COUNTIF(A:A,ROW()-1)

etc.

Alternatively, you could select 100 cells, say, B1:B100 and array-enter
(CTRL-SHIFT-ENTER or CMD-RETURN):

=FREQUENCY(A:A, ROW(INDIRECT("1:100")))

If your values are actually Text, then add the Text() function:

=COUNTIF(A:A,TEXT(ROW(),0))
 
Good idea John.
Could dress it up so that it could start in *any* row:

=COUNTIF(A:A,ROW(A1))
--


Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit!
-------------------------------------------------------------------


Assuming your values are actually numeric (in which case you don't need
the quotes):

If your COUNTIFs start in Row 1:

=COUNTIF(A:A,ROW())

If they start in Row 2:

=COUNTIF(A:A,ROW()-1)

etc.

Alternatively, you could select 100 cells, say, B1:B100 and array-enter
(CTRL-SHIFT-ENTER or CMD-RETURN):

=FREQUENCY(A:A, ROW(INDIRECT("1:100")))

If your values are actually Text, then add the Text() function:

=COUNTIF(A:A,TEXT(ROW(),0))
 
Back
Top