Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
marsupilami
 
Posts: n/a
Default Using a value from a cell inside a formula!


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-


--
marsupilami
------------------------------------------------------------------------
marsupilami's Profile: http://www.excelforum.com/member.php...fo&userid=2698
View this thread: http://www.excelforum.com/showthread...hreadid=398110

  #2   Report Post  
bj
 
Posts: n/a
Default

try
=countif(offset(indirect("F:"&cell1),0,0,cell2-cell1+1),"argument")

"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-


--
marsupilami
------------------------------------------------------------------------
marsupilami's Profile: http://www.excelforum.com/member.php...fo&userid=2698
View this thread: http://www.excelforum.com/showthread...hreadid=398110


  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

=COUNTIF(INDIRECT("F"&cell1&":F"&cell2),"argument" )

--

HTH

RP
(remove nothere from the email address if mailing direct)


"marsupilami"
wrote in message
...

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-


--
marsupilami
------------------------------------------------------------------------
marsupilami's Profile:

http://www.excelforum.com/member.php...fo&userid=2698
View this thread: http://www.excelforum.com/showthread...hreadid=398110



  #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

  #5   Report Post  
RagDyer
 
Posts: n/a
Default

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

=COUNTIF(INDEX(F:F,Cell1):INDEX(F:F,Cell2),argumen t)

--
HTH,

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


"marsupilami"
wrote in message
...

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-


--
marsupilami
------------------------------------------------------------------------
marsupilami's Profile:

http://www.excelforum.com/member.php...fo&userid=2698
View this thread: http://www.excelforum.com/showthread...hreadid=398110




  #6   Report Post  
marsupilami
 
Posts: n/a
Default


Thanks alot guys!

-M- :)


--
marsupilami
------------------------------------------------------------------------
marsupilami's Profile: http://www.excelforum.com/member.php...fo&userid=2698
View this thread: http://www.excelforum.com/showthread...hreadid=398110

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a Formula in Cell X modify Cell Y? alMandragor Excel Discussion (Misc queries) 7 February 10th 05 10:51 PM
Cell shows formula and not the result of the formula. stumpy Excel Worksheet Functions 2 January 14th 05 05:44 PM
looking for a formula Amanda Excel Worksheet Functions 5 January 5th 05 08:37 AM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 04:13 PM
Conditional Formatting for dates spacerocket Excel Worksheet Functions 2 November 4th 04 11:13 AM


All times are GMT +1. The time now is 12:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"