View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Solver - Assign values to Letters of the Alphabet

Truly hoping I'm not doing your homework for you : \

Try this:

For text in A1

B1:
=SUM((COUNTIF(A1,"*"&{"A","B","C","D","E","F","G", "H","I","J","K","L","M","N","O","P","Q","R","S","T ","U","V","W","X","Y","Z"}&"*")0)*{1,2,3,4,5,6,7, 8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,2 5,26})

OR....
B1:
=SUMPRODUCT((COUNTIF(A1,"*"&CHAR(ROW(INDIRECT("$A$ 1:$A$26"))+64)&"*")0)*ROW(INDIRECT("$A$1:$A$26")) )

Does that help?
***********
Regards,
Ron

XL2002, WinXP


" wrote:

I have a puzzle to solve and have been trying for a while now.

Each letter of the alphabet is valued between 1 - 26.

I have a list of 20 names. (Some have double letters in them such as
Barrett)

Each name has a known value based on the sum of it's letter values. (eg
Barrett MAY be 3+7+2+2+6+10+10 = 40 but I only know the total, NOT the
individual letter values)

Each value of 1 - 26 can only be used once for A - Z.

Requirement - Assign each letter of the alphabet a value between 1 & 26
to give the correct name value. Each letter value is to be used only
once.

Any help would be GREATLY appreciated.