Hi Pavan, Try this rev code
Function xSum(ParamArray Numbers()) As Variant
Dim BlockRange, SingleRange, Buffer
For Each BlockRange In Numbers
If WorksheetFunction.IsNumber(Evaluate(BlockRange)) Then
Buffer = Buffer + BlockRange
Else
For Each SingleR
De Promor,
Could you please check that code by giving hadcoded values in the fomula?
like xsum ( 1,2,3). it is not working. i want to have a function which
works eighther for range and for range and for both. Thanks for your work
on this.
-Pavan
On Thu, Aug 22, 2013 at 6:15 PM, De Premor wrote
Try this and explore it
Function xSum(ParamArray Numbers()) As Variant
Dim BlockRange, SingleRange, Buffer
For Each BlockRange In Numbers
For Each SingleRange In BlockRange
Buffer = Buffer + SingleRange
Next
Next
xSum = Buffer
End Function
Pada 22/08/
Hi Guys, Hope all are doing well.
Here comes the subject. I am trying to get the code behing sum function. I
searched for the but all went vain.
I tried using Paramarray but it is not working when we are refering to a
paraticular range. i want to write a function which really works like sum
fu