Public Function Numbers_In_Range(Data_Range As Range) As Long
Dim r1 As Long
Dim l1 As Long
Dim rth_Member As String
r1 = 0
Numbers_In_Range = 0
For r1 = 1 To Data_Range.Columns.Count
rth_Member = CStr(Data_Range(1, r1))
For l1 = 1 To Len(rth_Member)
Numbers_In_Range = Numbers_In_Range + Mid(rth_Member, l1, 1)
Next l1
Next r1
End Function
It needs to be inserted in a Module
and can be called by Numbers_in_Range(A1:A10)
- assuming your digits are in the range A1:10. Thanks
pgc - exactly what I needed.
xld - something I did not think of and using in my analysis.
Kap - your suggestions will be added to my reference library for future reference.
Thank you all for your help, greatly appreciated.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.