Sum the first character in a range
your example isn't very elaborate, as to if there are more rows or any other
factors
Sub test()
Dim i As Long
Dim n As Double
For i = 1 To 3
n = Left(Cells(1, i), 1) + n
Next
Range("e1").Value = n
End Sub
--
Gary
"John LR" wrote in message
...
Could some body Please help.
I need to sum the first number in each cell of my Range EG:
A1 B1 C1
2a 6c 2we = 10
Dim myrange1 As Range
Dim a As Integer
Set myrange1 = Range(Selection.EntireRow.Cells(1, 1), Selection)
a = Application.WorksheetFunction.Sum(myrange1)
MsgBox a
Any help much appreciated
|