Forum Discussion
Benoitgranger81
Aug 25, 2025Copper Contributor
How to get the first 3 numbers of a cell containing "=1+2+3+4"
I have a chart with cells containing sums like "=1+3+6+9".
Let name it cell A1.
And in next cell, A2 I need a function linking to A1 and asking to send only the sum of the first 3 digits, i.d. "=1+3+6".
I need a function, I cannot use VBA. Is it any possible?
How about
=SUM(--TAKE(TEXTSPLIT(MID(FORMULATEXT(A1), 2, 100), "+"), , 3))
2 Replies
How about
=SUM(--TAKE(TEXTSPLIT(MID(FORMULATEXT(A1), 2, 100), "+"), , 3))
- Benoitgranger81Copper Contributor
It works perfectly ! And I see that if I want the first 4 numbers, I just have to change inside the formula the last digit to 4. Thanks a lot ! (I needed it to sum sales value per month in cumulative : e.g. in March, sales from Jan to Mar.).