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...
- Aug 26, 2025
How about
=SUM(--TAKE(TEXTSPLIT(MID(FORMULATEXT(A1), 2, 100), "+"), , 3))
HansVogelaar
Aug 26, 2025MVP
How about
=SUM(--TAKE(TEXTSPLIT(MID(FORMULATEXT(A1), 2, 100), "+"), , 3))
Benoitgranger81
Aug 26, 2025Copper 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.).