G
Guest
Dear friends,
The following code will show result in percentage with left aligned(TEXT) in
excel. My requirement is that the result should be in number format right
aligned with the same percentage symbol along with the result. ( rather than
text with left aligned)
Public Function CAGR(FirstValue, LastValue)
Dim fv, lv, v As Double
Set r = Application.Range(FirstValue, LastValue)
Count = (Application.Range(FirstValue, LastValue).Count - 1)
CAGR = FirstValue
v = Application.WorksheetFunction.Rate(Count, 0, -(FirstValue), LastValue)
CAGR = Format(v, "00.00%")
End Function
Will any one guide me with the correct code for my requirement with required
modification.
The following code will show result in percentage with left aligned(TEXT) in
excel. My requirement is that the result should be in number format right
aligned with the same percentage symbol along with the result. ( rather than
text with left aligned)
Public Function CAGR(FirstValue, LastValue)
Dim fv, lv, v As Double
Set r = Application.Range(FirstValue, LastValue)
Count = (Application.Range(FirstValue, LastValue).Count - 1)
CAGR = FirstValue
v = Application.WorksheetFunction.Rate(Count, 0, -(FirstValue), LastValue)
CAGR = Format(v, "00.00%")
End Function
Will any one guide me with the correct code for my requirement with required
modification.