Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BKGT
 
Posts: n/a
Default Dynamically set a range?


Is there a way to dynamically set a range? For instance... can I have a
formula that includes a range (Ax:Ay) where I can set the values of x
and y based on the value of another cell so that in one case, the range
may be A1:A80 and in another it may be A50:A60 and so on?

Thanks.


--
BKGT
------------------------------------------------------------------------
BKGT's Profile: http://www.excelforum.com/member.php...o&userid=33862
View this thread: http://www.excelforum.com/showthread...hreadid=536778

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Richard Buttrey
 
Posts: n/a
Default Dynamically set a range?

On Thu, 27 Apr 2006 08:17:57 -0500, BKGT
wrote:


Is there a way to dynamically set a range? For instance... can I have a
formula that includes a range (Ax:Ay) where I can set the values of x
and y based on the value of another cell so that in one case, the range
may be A1:A80 and in another it may be A50:A60 and so on?

Thanks.


Use the Indirect Function

If your x & y variable cells are say B1 & B2

then with B1=50 and B2=60 and if (say) you're summing A50:A60, your
formula would be

=SUM(INDIRECT("A"&B1&":A"&B2))

HTH


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Arvi Laanemets
 
Posts: n/a
Default Dynamically set a range?

Hi

Like this:

=SUM(INDIRECT(A1))
, where A1 contains string like "A1:A80"


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )



"BKGT" wrote in message
...

Is there a way to dynamically set a range? For instance... can I have a
formula that includes a range (Ax:Ay) where I can set the values of x
and y based on the value of another cell so that in one case, the range
may be A1:A80 and in another it may be A50:A60 and so on?

Thanks.


--
BKGT
------------------------------------------------------------------------
BKGT's Profile:
http://www.excelforum.com/member.php...o&userid=33862
View this thread: http://www.excelforum.com/showthread...hreadid=536778



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BKGT
 
Posts: n/a
Default Dynamically set a range?


Great. That worked for me.

Thanks for the help and the quick responses.


--
BKGT
------------------------------------------------------------------------
BKGT's Profile: http://www.excelforum.com/member.php...o&userid=33862
View this thread: http://www.excelforum.com/showthread...hreadid=536778

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
UDF is updateing cells on another sheet with count from current sheet. John Excel Discussion (Misc queries) 3 March 20th 06 03:58 PM
FORMULA at Source range (in Data-validation-List) gives wrong re Eddy Stan Excel Worksheet Functions 6 March 17th 06 07:19 AM
Help with using range names in sum function soteman2005 Excel Worksheet Functions 2 November 28th 05 04:43 PM
Array to named range conversion... i-Zapp Excel Discussion (Misc queries) 4 October 25th 05 09:09 PM
How can I dynamically eliminate blank cells in a given range in E. Scott Steele Excel Worksheet Functions 6 December 17th 04 03:23 AM


All times are GMT +1. The time now is 10:04 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"