LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
J J is offline
external usenet poster
 
Posts: 9
Default specific cell values in two ranges

I am trying to do is to take a set of investment returns
and a benchmark over the same time period and calculate
the investment's compound return when the benchmark was
up divided by the benchmark's compound return when the
benchmark was up. This will therefore measure the amount
of the upside that an investment is capturing of the
market.

Mathematically - it is easy to see at the following
website -
http://support.pertrac2000.com/statistics2000.asp
Click on the left side - up capture ratio under
benchmark ratios.

The problem has to do with creating a loop that can
compare CORRESPONDING values within two ranges (obviously
equally sized ranges).

The benchmark part of the calculation is easy as it is
calculating (1+BM) times itself for the length of the
range. The fund part of the calculation is more
difficult as it uses corresponding cells from both ranges
(1+invesment) for each time that the benchmark is up.

Here is what i have so far:

Public Function UPCAPTURE(FUNDRETURNS As RANGE, BMRETURNS
As RANGE) As Double
Dim FUNDAP As Double
Dim BMAP As Double
Dim FUNDRNGCELL As RANGE
Dim BMRNGCELL As RANGE

BMAP = 1
For Each BMRNGCELL In bmreturns
If BMRNGCELL.Value 0 Then
BMAP = BMAP * (1 + BMRNGCELL.Value)
End If
Next BMRNGCELL

'HERE IS THE PART I CAN'T FIGURE OUT:
FUNDAP = ????

UPCAPTURE = (FUNDAP - 1) / (BMAP - 1)
End Function

Thank you for the help.
 
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
Referencing Named Ranges using values in a cell eggman Excel Discussion (Misc queries) 2 September 23rd 06 06:30 PM
How can I password protect specific cell ranges in Excel? spanner Excel Discussion (Misc queries) 1 March 21st 06 01:14 AM
How to slot cell values into pre-defined ranges KDD Excel Discussion (Misc queries) 7 August 29th 05 03:34 PM
Specific cell values Nigel Excel Discussion (Misc queries) 3 August 26th 05 11:23 AM
Adding Cell Values to Ranges Mike R Excel Programming 2 August 1st 03 09:37 AM


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