# Posts by qskmtk

• ## CurveUptakeA = CurveUptakeA + CurveUptake(ect, monthNumber(year, month, startYear, s

Re: CurveUptakeA = CurveUptakeA + CurveUptake(ect, monthNumber(year, month, startYear

Apologies but I am confused.
Let me try again and please bear with me.

1) judging by the following code, I assume CurveUptakeA is a custom function. And I know it is because when I type "=CurveUptakeA" in a cell, a dialog box will pop up and I can input the parameters in order for the function to spit out a result.
Function CurveUptakeA(ect As Double, year As Integer, startYear As Integer, startMonth As Integer, yearsToPeak As Double, endY As Double, _ Optional peakTime As Double = DEFAULT_PEAK, Optional decayFactor As Double = DEFAULT_DECAY) As Double

2) If CurveUptakeA is indeed a custom function, then I'd like to understand the exact calculation it is doing.
Judging by the following code, I just assumed (and sounds like I am wrong) the calculation for CurveUptakeA is defined as CurveUptakeA + Curveuptake
CurveUptakeA = CurveUptakeA + CurveUptake(ect, monthNumber(year, month, startYear, startMonth), 1, yearsToPeak, endY, peakTime, decayFactor)

I know I am missing something here but it looks like a circular calculation. Sorry I know this must be a really stupid question.

Thanks a lot!

• ## CurveUptakeA = CurveUptakeA + CurveUptake(ect, monthNumber(year, month, startYear, s

Re: CurveUptakeA = CurveUptakeA + CurveUptake(ect, monthNumber(year, month, startYear

Thanks again.
Please see below for the complete coding and let me know what I am missing. Thanks a lot!

• ## CurveUptakeA = CurveUptakeA + CurveUptake(ect, monthNumber(year, month, startYear, s

Re: CurveUptakeA = CurveUptakeA + CurveUptake(ect, monthNumber(year, month, startYear

Thanks.
The codes are pretty long so I was trying to keep the question short.
My ultimate question is why the CurveUptakeA function is defined as CurveUptakeA (i.e. the very function itself) +....
Please let me know if that makes sense. Thanks!

• ## CurveUptakeA = CurveUptakeA + CurveUptake(ect, monthNumber(year, month, startYear, s

Apologize first for a very rudimentary VBA question:

(1) I came across the following coding for a custom function "CurveUptakeA"
CurveUptakeA = CurveUptakeA + CurveUptake(ect, monthNumber(year, month, startYear, startMonth), 1, yearsToPeak, endY, peakTime, decayFactor)
"CuveUptake" as a separate custom function is defined separately.