PDA

View Full Version : How to Use ParamArray (Ratio Function)



Rajan_Verma
10-20-2011, 09:18 PM
Param array is the collection of variant type variable : its allow to pass Voluntarily Variable to a Function, See the Below Mention Ratio Function, We can give any number of Arguments to this Function and can get Ratio:



Function Ratio(ParamArray arr()) As String
For i = 0 To UBound(arr)
Ratio = Ratio & arr(i) / WorksheetFunction.Gcd(arr) & ":"
Next
Ratio = Left(Ratio, Len(Ratio) - 1)
End Function

littleiitin
11-10-2011, 06:04 PM
Nice stuff