Provided there is a solution (in your sample case - not*) you could try to use Solver for that.
See attachment
- all letters listed in P3:P12 with initial assigned numbers listed in column Q
- words in column B (B2:B4) are spllitted into letters with formula in L2 (I assumed tham max length is 10 letters) with formula (and copy down/left):
- then letters are converted into digits with formula in L6 (and again copied dowm and left):
- then "school alike" summing of each decimal position in L10 and possible "in memory" in F11 (and copy left):
- measure of misfit between row 8 (representation of "sum world") and row 10 (sum of representations of both "added words") in B13 (will be used as goal to be minimized by solver):
- helper column to check if each digit has been used only once in R3 and copy down:
Solver settings:
- goal as mentioned above,
- changed cells Q3:Q12,
- constraints for these cells >=0 and <=9 and integer, for R3:R12 =1
- model - evolutionary (available since excel 2010)
*)
1) HELLO
+ JOHN
=MELON
So we know O = 0
HELLO
+ JOHN
=MELON
As O=0, we know L+H = 10 and in next to left column will use +1 from "the rest in memory"
1
HELLO
+ JOHN
=MELON
1+L+0=L so L=L+1 -> impossible!
(I know that you mentioned that it is just an idea - not a real problem, but always it is easier to look for solution once you know there is at least one :-) )
PS. Final idea: one can use brute force method, and try all possible assignments - there is less than 4 millions of possible permutations of 10 letters - shall be possible to calculate in reasonable time.
Bookmarks