|
|
Subject:
variable range names in Excel
Category: Computers > Software Asked by: joemeth-ga List Price: $2.00 |
Posted:
20 Jun 2006 11:00 PDT
Expires: 20 Jul 2006 11:00 PDT Question ID: 739702 |
I want to turn a cell location in a the range definition in an MS Excel function into a variable so that I can test a number of alternative results. For example, in the funtion =average(a1:a30) I'd like to the "a30" or only the "30" to refer to another cell, like b1 so that if I change the value in b1 to say "a60" or "60" I can change the range length in the function to =average(a1:a60) I plan to use this in order to do some tests on alternative moving averages of a series of values to see which produces the best results. |
|
There is no answer at this time. |
|
Subject:
Re: variable range names in Excel
From: anhebetude-ga on 21 Jun 2006 15:28 PDT |
I believe that you can achieve your desired result with the OFFSET function, which returns a range and accepts cell references as inputs. Taking your example of column A containing the data and using B1 as the cell in which you input the desired range (30, 60, etc.), the following formula should accomplish your task. =AVERAGE(OFFSET(A1,0,0,B1,1)) I hope this helps, anhebetude |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |