Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Phillycheese5
 
Posts: n/a
Default Setting dynamic range in a formula


Hi,
I have a column of numbers and I want the following array formula to
always use the last 12 entries:
=(PRODUCT(1+D1:D12/100)-1)*100
Any suggestions?
Thanks,
Phillycheese5

P.S.
Last question today :-)


--
Phillycheese5
------------------------------------------------------------------------
Phillycheese5's Profile: http://www.excelforum.com/member.php...o&userid=24196
View this thread: http://www.excelforum.com/showthread...hreadid=378121

  #2   Report Post  
Ron Coderre
 
Posts: n/a
Default


What do you want the ultimate formula to do with the last 12 entries?

Add them?
Average them?

Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=378121

  #3   Report Post  
Phillycheese5
 
Posts: n/a
Default


I want it to be the range for the formula I listed which is a geometric
linking fomula. I can't use the GEOMEAN because it ignors negative
returns.


--
Phillycheese5
------------------------------------------------------------------------
Phillycheese5's Profile: http://www.excelforum.com/member.php...o&userid=24196
View this thread: http://www.excelforum.com/showthread...hreadid=378121

  #4   Report Post  
Ron Coderre
 
Posts: n/a
Default


This formula returns the range of the last 12 entries, which you can
hopefully use:

=OFFSET(INDIRECT("D"&SUMPRODUCT(MAX(((D1:D50)<"") *(ROW((D1:D50)))))),-11,,12)


Note: It does not check for blanks. If finds the last entry and
returns the last 12 cells ending in the location of the last entry. If
you need the last actual non-blank entries, let me know.

Does that help?

Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=378121

  #5   Report Post  
Ron Coderre
 
Posts: n/a
Default


In your array formula, my formula would be this:

=(PRODUCT(1+OFFSET(INDIRECT("D"&SUMPRODUCT(MAX(((D 1:D50)<"")*(ROW((D1:D50)))))),-11,,12)/100)-1)*100

Committed with [Ctrl]+[Shift]+[Enter]

Is that what you're looking for?

Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=378121



  #6   Report Post  
Phillycheese5
 
Posts: n/a
Default


Ron,
It's very close...and I'm not sure how to tweak it...
The last 12 returns I have are these:
1.40%
-5.26%
-3.87%
2.04%
3.91%
4.01%
2.77%
0.44%
-1.06%
2.31%
-3.72%
4.66%
which links for a cumulative of 7.23, and the formula you provided
yields 7.63.
Not sure where the difference is...the returns only go out 2 decimals,
so it's not rounding.
I really appreciate the help.
Phillycheese5


--
Phillycheese5
------------------------------------------------------------------------
Phillycheese5's Profile: http://www.excelforum.com/member.php...o&userid=24196
View this thread: http://www.excelforum.com/showthread...hreadid=378121

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
What formula is used for subtracting a range of different cells f. tim Excel Worksheet Functions 3 April 21st 23 10:07 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Can a formula check for a certain value in a range? Lee IT Excel Discussion (Misc queries) 3 April 8th 05 07:36 AM
can a formula check for a certain value in a range? Lee IT Excel Discussion (Misc queries) 1 April 7th 05 04:31 PM
How do I use Range Names listed in a VLookup table in a formula? Essbasedvlpr32 Excel Worksheet Functions 3 December 15th 04 10:11 PM


All times are GMT +1. The time now is 09:43 AM.

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"