So I understand that if the SUM function is used to total a range, and the data is formatted as text, it will return zero.
But what I do not understand is why SUM works if used in a formula to total the results of other formulas that are returned as text.
In the attached sheet I have the following text string in cell B3: PRX 19 1 - 2 - 1 $53,940
Just to be clear, it is a record for a horse that raced at PARX racetrack. The horse raced 19 times, finished 1st once, second twice and third once. The total purse money won was $53,940.
So I wrote this formula in cell B5 to calculate the percentage to show out of his 19 races, how often the horse was able to finish 1st, 2nd or 3rd.
The formula works perfectly and the result = 0.210 or 21%
But if the results of those TEXTAFTER(TEXTBEFORE formulas are text, not numbers, I don't understand why this formula doesn't return an error.
So I dissected the formula above. Each section of the formula is now like this:
F3 = TEXTAFTER(TEXTBEFORE(B3," ",3)," ",2) which returns 1
F4 =TEXTAFTER(TEXTBEFORE(B3," - ",2)," - ",1) which returns 2
F5 = TEXTAFTER(TEXTBEFORE(B3," $")," - ",2) which return 1
Now in F8 the SUM function is used to calculate the total of the cells in the column F, Just like it summed the results of those same exact formulas in B5, and it returns zero!
So I'm confused. Why does the formula in B5 return the correct result when it seems to be doing the same thing, summing text, not numbers?
Bookmarks