Forum Discussion
Calculate simple equation which is included in one cell..
Played a bit taken the approach from here https://www.mrexcel.com/forum/excel-questions/505622-text-numbers-same-cell-sum-numbers.html
For simplicity let assume your numbers are split by spaces, not by ALT+ENTER.
In A2 you have "200 3 4 6 2"
When
=SUMPRODUCT(
IF(
SUBSTITUTE(TRIM(MID(SUBSTITUTE($A2," ",REPT(" ",10)),{1,2,3,4,5,6,7,8}*10-9,10)),",","")="",
0,
SUBSTITUTE(TRIM(MID(SUBSTITUTE($A2," ",REPT(" ",10)),{1,2,3,4,5,6,7,8}*10-9,10)),",","")*1)
)
gives 215.
Here 10 in REPT is any number which is more than length of your biggets number
Array {1,2,..} is more than biggest number of numbers in your cells
First SUBSTITUTES compares with IF set extra members of array to 0 (othervise you'll have an error)
*1 close to end converts string array with numbers into the numeric array
You may use Evaluate Formula in Ribbon to check how it works.
And i guess you may use directly ALT+ENTER symbol in final formula
- Abdullah OmamJan 30, 2017Copper Contributor
thank you very much , could you please send me it in Excel ..
- SergeiBaklanJan 30, 2017Diamond Contributor
Attached
- Abdullah OmamJan 30, 2017Copper Contributor
It is not working fine , I tried different values like 100 1600 2000 in the cell it gave me value 1900 ..
- SergeiBaklanJan 25, 2017Diamond Contributor
Forgot to say that's not an array formula, i.e. without ctrl+shift+enter