Dear All (my first query so please excuse any protocol breaches)
1. I am trying to sum a row of 23 cells that each contain a number and sometimes a number with a letter e.g. 2; 4; 17C; 1; 8F (so it should equal 32).
2. The macro formula below that I found works on an individual cell, but I cannot get it to work across a number of cells (BTW I do not know macros as all).
3. I am not wedded to a macro if there is a simpler way - can anyone assist please with a formula?
Many thanks!
Function SumNumbers(rngS As Range, Optional strDelim As String = " ") As Double
'Updateby Extendoffice
Dim xNums As Variant, lngNum As Long
xNums = Split(rngS, strDelim)
For lngNum = LBound(xNums) To UBound(xNums) Step 1
SumNumbers = SumNumbers + Val(xNums(lngNum))
Next lngNum
End Function
1. I am trying to sum a row of 23 cells that each contain a number and sometimes a number with a letter e.g. 2; 4; 17C; 1; 8F (so it should equal 32).
2. The macro formula below that I found works on an individual cell, but I cannot get it to work across a number of cells (BTW I do not know macros as all).
3. I am not wedded to a macro if there is a simpler way - can anyone assist please with a formula?
Many thanks!
Function SumNumbers(rngS As Range, Optional strDelim As String = " ") As Double
'Updateby Extendoffice
Dim xNums As Variant, lngNum As Long
xNums = Split(rngS, strDelim)
For lngNum = LBound(xNums) To UBound(xNums) Step 1
SumNumbers = SumNumbers + Val(xNums(lngNum))
Next lngNum
End Function