I need some vba help.
I use the following code to write an array (of arrays) to a range of the same lenght. But whenever a particular variable = "Best Estimate" I need the value multiplied wit (1 +risk margin) visible in the formulas. Does anbody know how to achieve this?
Thx wizards
code:
_______________
If arRuninfo(1)(j) = "Best Estimate" Then
Range(rOutput(1, m), rOutput(UBound(arResult(i)(j)(k)(m)), m)).Value2 = WorksheetFunction.Transpose(arResult(i)(j)(k)(m)) '* (1 +rRiskMargin) last part needs to be added and visible in de cells
Else
Range(rOutput(1, m), rOutput(UBound(arResult(i)(j)(k)(m)), m)).Value2 = WorksheetFunction.Transpose(arResult(i)(j)(k)(m))
End If
I use the following code to write an array (of arrays) to a range of the same lenght. But whenever a particular variable = "Best Estimate" I need the value multiplied wit (1 +risk margin) visible in the formulas. Does anbody know how to achieve this?
Thx wizards
code:
_______________
If arRuninfo(1)(j) = "Best Estimate" Then
Range(rOutput(1, m), rOutput(UBound(arResult(i)(j)(k)(m)), m)).Value2 = WorksheetFunction.Transpose(arResult(i)(j)(k)(m)) '* (1 +rRiskMargin) last part needs to be added and visible in de cells
Else
Range(rOutput(1, m), rOutput(UBound(arResult(i)(j)(k)(m)), m)).Value2 = WorksheetFunction.Transpose(arResult(i)(j)(k)(m))
End If