View Single Post
  #4   Report Post  
ronthedog
 
Posts: n/a
Default


marsupilami Wrote:
Hi!

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

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

But my problem is this; how can I use the values in the two cells
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 row
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))


--
ronthedog
------------------------------------------------------------------------
ronthedog's Profile: http://www.excelforum.com/member.php...o&userid=26504
View this thread: http://www.excelforum.com/showthread...hreadid=398110