Reputation: 3
I've got the table whereby: The left number of * contains the count of something, the right is the value of it. I'm trying to figure out the sum of all the counts, irrespective of value. The result that I'm trying to work towards is under the "result" header.
Raw | Result |
---|---|
1*2+2*3+3*4+3*5+5*6 | 14 |
882*1 | 882 |
321*2+112*128 | 433 |
Trying out using names within excel for to evaluate it, but I'm unsure if you can iterate and get each position of the numbers on the left of the " * ".
Upvotes: 0
Views: 49
Reputation: 9062
Assuming the only operations are addition
and multiplication
, for Office 365
:
=BYROW(A1:A3,LAMBDA(ζ,SUM(INDEX(0+TEXTSPLIT(ζ,"*","+"),,1))))
Upvotes: 2