Adding sum of text

H

HP

Example:
A B C
a 1 abcd
b 2
c 3
d 4
e 5
f 6
g 7
We would like C1 to equal the amounts of B1:B4 when we type letters "abcd."
 
A

AlfD

Hi!

Depends on how representative of the reality your little model is.

As it stands, a single formula placed in, say, D1 will calculate th
equivalence of abcd in C1
=VLOOKUP(MID(C1,1,1),TB,2,0)+VLOOKUP(MID(C1,2,1),TB,2,0)+VLOOKUP(MID(C1,3,1),TB,2,0)+VLOOKUP(MID(C1,4,1),TB,2,0)
(entered as a single line).

where TB is the Name of the range A1:B7.

This will only deal (for obvious reasons) with exactly 4 letters in th
string in C1.

If you want to deal with variable lengths of strings in C1, I woul
turn to VBA.
Also, if you really want (as I read your post) to put the letters in C
and have the answer returned in the same cell, VBA is the only way.

Come back if there's more information to add.

Al
 
Top