• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Can I assign numeric values to specific characters then count the total?

WorkingMan

New Member
Hello,


Can I assign numberic values to specific alpha/numeric characters and then count the total in another cell.


So aa=8, xi1=10, N2=12, then populate a columns with the desired characters and then total them at the bottom of the column.?


thanks
 
Hi,


One way to do it would be to have a table in which you list your alpha/numeric characters in one column and their value in the other column. After, you can use a Helper column and the VLOOKUP function to get the real values and you sum on your helper column.


Let's say your table is in A1:B3. The values you type in column D and your helper column in E.

In D1, you type "aa"

in E1, you have the formula =VLOOKUP(D1,$A$1:$B$3,2,0)

E1 will be equal to 8


You can copy your formula in other cells and make the sum from the values in column E.
 
Thanks

But it seems to just copy what's in B1 to E1 when I put the value "aa" in D1.


https://docs.google.com/open?id=1-zZAeE0NijWLKbY6WJDoGwdFpVrLkHbOAwKbpzZD6x67g2yecZa3_TqpbCCl


Radman/WorkingMan
 
Hi ,


Assume your lookup table shown below is from H1:I3.


AA ..... 8

T1 .... 12

r4 .... 10


Now if you have entered the following values from cells A6 through A8 :


AA

T1

r4


In cell A9 , enter the following formula :


=VLOOKUP(A6,$H$1:$I$3,2,FALSE)+VLOOKUP(A7,$H$1:$I$3,2,FALSE)+VLOOKUP(A8,$H$1:$I$3,2,FALSE)


You will get 30.


Narayan
 
Back
Top