Using a value from a cell inside a formula!

M

marsupilami

Hi!

I've got two cells that contain the start and end row of a matrix in
sheet.

I want to use these row numbers in a =COUNT.IF formula to count th
number of specified instances in this matrix.

But my problem is this; how can I use the values in the two cell
inside the COUNT.IF formula??

I should look something like this;

=COUNT.IF(F"cell1":F"cell2";"=argument")

As you can see, the column (F) is specified in the formula but the ro
number needs to be fetched from cell1 and cell2.

Can anyone help me with the correct syntax?

Thanks!

-M
 
R

ronthedog

marsupilami said:
Hi!

I've got two cells that contain the start and end row of a matrix in
sheet.

I want to use these row numbers in a =COUNT.IF formula to count th
number of specified instances in this matrix.

But my problem is this; how can I use the values in the two cell
inside the COUNT.IF formula??

I should look something like this;

=COUNT.IF(F"cell1":F"cell2";"=argument")

As you can see, the column (F) is specified in the formula but the ro
number needs to be fetched from cell1 and cell2.

Can anyone help me with the correct syntax?

Thanks!

-M-

Use an INDIRECT function and concatenate with the &

eg you can refer to a cell as follows

=indirect("A" & B23 & ":A" & B24)

so your formula would look something like

=countif(Indirect("F" & cell1 & ":F" & cell2, argument)
 
R

RagDyer

Another way, which I believe, is non-volatile:

=COUNTIF(INDEX(F:F,Cell1):INDEX(F:F,Cell2),argument)

--
HTH,

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


"marsupilami" <[email protected]>
wrote in message
news:[email protected]...
 

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

Top