how to assign a value to the alphabet in order to add up letters

R

Robert Horne

I am trying to add up cells that have either a "a" in it or a "h" in it. I
would like to assign a value of 1 to "a" and 2 to "h"
 
P

Peo Sjoblom

One way

=SUMPRODUCT(COUNTIF(A1:A10,{"a";"h"}),{1;2})

with your a and h in A1:A10

Regards,

Peo Sjoblom
 
Top