Hi all,

Trying to set up a couple of UDF's but having problems with the fidgity bits!!

First one.. Nice easy one to start with!!

In the spreadsheet the formula is as follows =SUM(A1:A5)/5

The ?? Is the bit I can't figure out, how do apply the range A1:A5 to i ??


Function FMA(i)
?? 
FMA = WorksheetFunction.Sum(i) / 5
End Functio
n


And the second one, blimey

Sharp intake of breath...

I'm trying to acheive

RSI=100-100/(1-A/B)
A refers to the average of up days in a given period.
B refers to the average of down days in a given period

So say there are 5 up days in the period which is 10 days.

The up days are for example 13, 14, 56, 37, 2. These then need to
be added and stored in A

Likewise, we have 5 down days eg 40,67, 34,12,4. Again these all
need to be added to B

So what needs to happen is for the spreadsheet to recognise when there
is an upday from the previous day, or when there is a down day compared
to the previous day, tall those up and include them in the A & B ??

Hope that makes some kinda sense??

Thanks in advance for any advice you can offer