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
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