A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
The MID is used to parse out the characters one at a time - but returns them as string values. The second - converts them to numbers - but then they are negative, so the first - makes them positive.
This would return 0 because of the strings
=SUMPRODUCT(MID(A1,ROW(INDIRECT("1:" & LEN(A1))),1))
This would return the negative of the sum of the digits
=SUMPRODUCT(-MID(A1,ROW(INDIRECT("1:" & LEN(A1))),1))
This will also return the correct sum of the digits
=-SUMPRODUCT(-MID(A1,ROW(INDIRECT("1:" & LEN(A1))),1))
This will also return the sum of the digits - but apparently, multiplying is too processor intensive for some Excel fanatics' tastes. Multiplying is my preferred approach for when I need to convert booleans or strings to numbers
=SUMPRODUCT(1*MID(A1,ROW(INDIRECT("1:" & LEN(A1))),1))