I ran into a similar problem, but took a different path, wanting to avoid using vba. The recursive use of replacement did the trick for me, as shown below:
Raw data (in A1: An, n = integer) ROE -1.00 P / E 0.07 -0.85 ROC-ROE 0.02 -0.03, etc.
= SUBSTITUTE (SUBSTITUTE (SUBSTITUTE (SUBSTITUTE (SUBSTITUTE (SUBSTITUTE (SUBSTITUTE (SUBSTITUTE (SUBSTITUTE (SUBSTITUTE (SUBSTITUTE (SUBSTITUTE (A1, "1", ")," 0 ","), "2", ")," 3 ",") , "4", ")," 5 ","), "6", ")," 7 ","), "8", ")," 9 "," ")
which can be expanded to get rid of the "-" and the decimal indicator "." as well as "+" (if necessary) and, finally, extra spaces using
= trim (spare (spare) substitue (Substitute (Substitute (Substitute (Substitute (Substitute (Substitute (Substitute (Substitute (Substitute (Substitute (A1, "1", ")," 0 ","), "2", " ), "3", ")," 4 ","), "5", ")," 6 ","), "7", ")," 8 "", ")," 9 "," ), "-", ")," + ","), ".", ""))
where lowercase represents the difficulties added in the current step.
This naturally displays the entire array, changing the reference to the entire array that needs to be analyzed (A1: An), and enter the formula as an array (i.e., using Ctl + Enter instead of Enter to complete the task).
Then I use len (B1) to check the results I want.
Not elegant, really. But it can be a useful exercise for teaching students to think and code on the fly.