Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 361
Default Vary the Range in a Function

I use this function

=COUNTIF(Sheet2!C$324:C$344;Sheet3!$D5)

I am looking for a good way to vary the range C$324:C$344 based on a number
I input in anther cell.

Lets say in a1 I have the value 20. I would like the range to be C$324:C$344.

If I change a1 to 50. I would like the range to be C$294:C$344.

Basicaly take the end of the range - C$344 - and subtract the number in a1.

Is this possible.

Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Vary the Range in a Function

One way:

=COUNTIF(OFFSET(SHEET2!$C$324,0,0,A1+1;1);Sheet3!$ D5)


In article ,
carl wrote:

I use this function

=COUNTIF(Sheet2!C$324:C$344;Sheet3!$D5)

I am looking for a good way to vary the range C$324:C$344 based on a number
I input in anther cell.

Lets say in a1 I have the value 20. I would like the range to be C$324:C$344.

If I change a1 to 50. I would like the range to be C$294:C$344.

Basicaly take the end of the range - C$344 - and subtract the number in a1.

Is this possible.

Thank you in advance.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default Vary the Range in a Function

Maybe another way:

=COUNTIF(INDIRECT("Sheet2!" & H1 & ":" & I1),Sheet3!$D5)

H1 and I1 contains the desired range (ex. C$324 and C$344)

HTH,
Paul


"carl" wrote in message
...
I use this function

=COUNTIF(Sheet2!C$324:C$344;Sheet3!$D5)

I am looking for a good way to vary the range C$324:C$344 based on a
number
I input in anther cell.

Lets say in a1 I have the value 20. I would like the range to be
C$324:C$344.

If I change a1 to 50. I would like the range to be C$294:C$344.

Basicaly take the end of the range - C$344 - and subtract the number in
a1.

Is this possible.

Thank you in advance.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Vary the Range in a Function

Another way ... non-volatile:

Enter start row in A1,
And end row in A2.

=COUNTIF(INDEX(Sheet2!C:C,A1):INDEX(Sheet2!C:C,A2) ,Sheet3!$D5)

--

HTH,

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

"carl" wrote in message
...
I use this function

=COUNTIF(Sheet2!C$324:C$344;Sheet3!$D5)

I am looking for a good way to vary the range C$324:C$344 based on a number
I input in anther cell.

Lets say in a1 I have the value 20. I would like the range to be
C$324:C$344.

If I change a1 to 50. I would like the range to be C$294:C$344.

Basicaly take the end of the range - C$344 - and subtract the number in a1.

Is this possible.

Thank you in advance.


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
How do I create a macro that will select a range that can vary in smokief Excel Discussion (Misc queries) 2 May 3rd 07 08:32 PM
In excel, how do I vary a cell over a data range & see its effect? Bimal Charts and Charting in Excel 1 April 13th 07 02:21 PM
INDIRECT / Setting to vary a range? nastech Excel Discussion (Misc queries) 1 September 4th 06 12:48 AM
Vary bar colors by bar Tim Charts and Charting in Excel 1 April 3rd 06 08:20 PM
How can I vary graph color by range value pcover Charts and Charting in Excel 3 June 6th 05 01:14 AM


All times are GMT +1. The time now is 05:42 PM.

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

About Us

"It's about Microsoft Excel"