View Single Post
 
Old 05-22-2017, 03:45 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

In that case, try this macro after selecting the cells you want totalled
Code:
Sub CountNums()
  Dim lngCount As Long: lngCount = 0
  Dim oRng As Range
  For Each oRng In Selection.Areas(1)
    lngCount = lngCount + Split(oRng.Value, " ")(0)
  Next oRng
  MsgBox "The first numbers add up to: " & lngCount
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote