Paste the below UDF(User Defined Function) in module and use function.
Function Name "=sum_cell_values"
Function sum_cell_values(rng As Range)
Dim i As Integer
j = 0
For i = 1 To Len(rng)
j = WorksheetFunction.Sum(j, VBA.Mid(rng, i, 1))
Next
sum_cell_values = j
End Function
Did it help you? Please post your valuable comment. Thanks!
Hi Shweta
ReplyDeleteI am just beginning to learn VBA. Could you kindly help me understand the above code bit by bit?
Regards
AK