#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 155
Default Dynamic Ranges

Hi, Following previous advice, the following formula returns the % "Yes" in a
range from J84:J**; ** being referenced from a value in cell A2. Is it
possible to now tweek this formula so that the first part of the range
(J84)is also remotely referenced from a value in say B2 ? i.e. J"&B2:J"&A2 ?

=COUNTIF(INDIRECT("J84:J"&A2),"Yes")/COUNTA(INDIRECT("J84:J"&A2))*100

Many Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default Dynamic Ranges

Try this:

=COUNTIF(INDIRECT("J"&B2&":J"&A2),"Yes")/COUNTA(INDIRECT("J"&B2&":J"&A2))*100

HTH,
Elkar



"Graham" wrote:

Hi, Following previous advice, the following formula returns the % "Yes" in a
range from J84:J**; ** being referenced from a value in cell A2. Is it
possible to now tweek this formula so that the first part of the range
(J84)is also remotely referenced from a value in say B2 ? i.e. J"&B2:J"&A2 ?

=COUNTIF(INDIRECT("J84:J"&A2),"Yes")/COUNTA(INDIRECT("J84:J"&A2))*100

Many Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Dynamic Ranges

=COUNTIF(INDIRECT("J" & B2 &":J"&A2),"Yes")/COUNTA(INDIRECT("J" & B2
&":J"&A2))*100

"Graham" wrote:

Hi, Following previous advice, the following formula returns the % "Yes" in a
range from J84:J**; ** being referenced from a value in cell A2. Is it
possible to now tweek this formula so that the first part of the range
(J84)is also remotely referenced from a value in say B2 ? i.e. J"&B2:J"&A2 ?

=COUNTIF(INDIRECT("J84:J"&A2),"Yes")/COUNTA(INDIRECT("J84:J"&A2))*100

Many Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Dynamic Ranges

Graham wrote...
Hi, Following previous advice, the following formula returns the %
"Yes" in a range from J84:J**; ** being referenced from a value in
cell A2. Is it possible to now tweek this formula so that the first
part of the range (J84)is also remotely referenced from a value in
say B2 ? i.e. J"&B2:J"&A2 ?

=COUNTIF(INDIRECT("J84:J"&A2),"Yes")/COUNTA(INDIRECT("J84:J"&A2))*100


Yes, but there's a better way to do this.

=COUNTIF(INDEX(J:J,B2):INDEX(J:J,A2),"Yes")
/COUNTA(INDEX(J:J,B2):INDEX(J:J,A2))*100

Better still would be to restict this to the largest possible range.
If that were J1:J1000,

=COUNTIF(INDEX(J1:J1000,B2):INDEX(J1:J1000,A2),"Ye s")
/COUNTA(INDEX(J1:J1000,B2):INDEX(J1:J1000,A2))*100

Then there's shorter.

=100*PRODUCT(COUNTIF(INDEX(J1:J1000,B2):INDEX(J1:J 1000,A2),
{"Yes","<"})^{1,-1})

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 155
Default Dynamic Ranges

Many thanks to you both!

"Elkar" wrote:

Try this:

=COUNTIF(INDIRECT("J"&B2&":J"&A2),"Yes")/COUNTA(INDIRECT("J"&B2&":J"&A2))*100

HTH,
Elkar



"Graham" wrote:

Hi, Following previous advice, the following formula returns the % "Yes" in a
range from J84:J**; ** being referenced from a value in cell A2. Is it
possible to now tweek this formula so that the first part of the range
(J84)is also remotely referenced from a value in say B2 ? i.e. J"&B2:J"&A2 ?

=COUNTIF(INDIRECT("J84:J"&A2),"Yes")/COUNTA(INDIRECT("J84:J"&A2))*100

Many Thanks



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 155
Default Dynamic Ranges

Thank-you to you too Harlan. When you say 'better way to do this', in what
context ? The previous works, would it be worth my while to change it to your
suggestion ? There often appear to be different ways of achieving the same
result in Excel ?

"Harlan Grove" wrote:

Graham wrote...
Hi, Following previous advice, the following formula returns the %
"Yes" in a range from J84:J**; ** being referenced from a value in
cell A2. Is it possible to now tweek this formula so that the first
part of the range (J84)is also remotely referenced from a value in
say B2 ? i.e. J"&B2:J"&A2 ?

=COUNTIF(INDIRECT("J84:J"&A2),"Yes")/COUNTA(INDIRECT("J84:J"&A2))*100


Yes, but there's a better way to do this.

=COUNTIF(INDEX(J:J,B2):INDEX(J:J,A2),"Yes")
/COUNTA(INDEX(J:J,B2):INDEX(J:J,A2))*100

Better still would be to restict this to the largest possible range.
If that were J1:J1000,

=COUNTIF(INDEX(J1:J1000,B2):INDEX(J1:J1000,A2),"Ye s")
/COUNTA(INDEX(J1:J1000,B2):INDEX(J1:J1000,A2))*100

Then there's shorter.

=100*PRODUCT(COUNTIF(INDEX(J1:J1000,B2):INDEX(J1:J 1000,A2),
{"Yes","<"})^{1,-1})


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
Dynamic Ranges patrick Excel Discussion (Misc queries) 2 July 22nd 07 04:53 AM
Dynamic ranges Brad Charts and Charting in Excel 2 September 8th 06 08:39 PM
Dynamic Ranges ACase Excel Discussion (Misc queries) 4 March 26th 05 10:16 PM
dynamic ranges Sam Excel Worksheet Functions 2 January 21st 05 07:46 PM
Dynamic Formulas with Dynamic Ranges Ralph Howarth Excel Worksheet Functions 5 January 21st 05 08:44 AM


All times are GMT +1. The time now is 08:35 AM.

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"