Reputation: 3
I just want to get the sum of all the values on the left side and not include the date.
Upvotes: 0
Views: 81
Reputation: 461
Hey, Try this, even the data is inconsistent with more spaces, this will work.
=SUMPRODUCT(LEFT(A2:A6,SEARCH("-",SUBSTITUTE(A2:A6," ",""))-1)+0)
Upvotes: 0
Reputation: 461
Textsplit, Textbefore functions are available on office365. If the user is not using office365, sumproduct would be the preferrable choice.
Upvotes: 0
Reputation: 848
A slight variation to the previous proposals for two reasons:
- -
has been used to force enumeration, then SUM() is sufficient.Thus:
=SUM(--TEXTBEFORE(A2:A6," "))
is more versatile.
Upvotes: 0
Reputation: 37155
Try SUMPRODUCT()
. Assuming, you have space after value.
=SUMPRODUCT(--LEFT(A1:A4,SEARCH(" ",A1:A4)))
Upvotes: 1