Adding to defined cell/row

  • Thread starter Thread starter MrMarmite
  • Start date Start date
M

MrMarmite

Hi,

I have a spreadsheet that is being added to (rows) by many people and
would like a way to avoid having to keep changing multiple formulae.
As an example, the following counts up to row 74.

=COUNTIF(D2:D74,$AD2)

Is is possible for this this value "74" to be derived from the value
in a cell, so is Cell G22 contained the value 74 I could have
something like

=COUNTIF(D2:Dvalue_of_cell(G22),$AD2)

clearly value_of_cell is nonsense, but I think it explains what I am
trying to do

any help much appreciated

James
 
Is there a reason you can't use the entire column?

=countif(d:d,$ad2)
or if this formula is in D1:
=countif(d2:d65536,$ad2)
or just something that you know is large enough to always work:
=countif(d2:d9999,$ad2)

(if you're using xl2007, you may be able to use a lot more rows).
 
Is there a reason you can't use the entire column?

=countif(d:d,$ad2)
or if this formula is in D1:
=countif(d2:d65536,$ad2)
or just something that you know is large enough to always work:
=countif(d2:d9999,$ad2)

(if you're using xl2007, you may be able to use a lot more rows).

Thanks. I could do that...but there will be times that we only want to
count down to a certain line.

Thanks

James
 
Agree with Dave but, if you insist
=COUNTIF(INDIRECT("$d$2:$d$"&g22),"$ad2")

Thanks. Can't seem to get that to work though...but I'll play around
with it some more
 
I don't know why I sent with quotes around $ad2.
=COUNTIF(INDIRECT("$d$2:$d$"&g22),$ad2)
 
Back
Top