Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Spredsheet problem

I need to give a numeric value to letters in individual cells. ex. A=10
B=15 c=5.
Do I need to build a chart to reference? I am in need of big help, a magic
formula.

Justin
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Spredsheet problem

I see what you are sying joe but i would like to add the values as we

eg. A A B A B 40

"wildlife guy" wrote:

I need to give a numeric value to letters in individual cells. ex. A=10
B=15 c=5.
Do I need to build a chart to reference? I am in need of big help, a magic
formula.

Justin

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default Spredsheet problem

"wildlife guy" wrote:
I see what you are sying joe but i would like
to add the values as we
eg. A A B A B 40


If A=10 and B=15, A+A+B+A+B is 60, not 40.

Is "A A B A B" a string in a single cell, or does A A B A B represent the
contents of 5 cells?

In either case, I am struggling with an Excel formula to calculate the sum.
I'll continue to think about it. But it appears to be a mess, in any case.

A VBA solution is concise, efficient and easy to implement. Is that
acceptable?

If A1 contains the string "A A B A B" and X1:X26 contains the 26 values for
each letter, the formula would be:

=sumcodes(A1, X1:X26)

The VBA function is:

Function sumcodes(s As String, v As Range) As Double
Dim i As Integer, c As String * 1, sc As Double
For i = 1 To Len(s)
c = UCase(Mid(s, i, 1))
If "A" <= c And c <= "Z" Then sc = sc + v.Cells(Asc(c) - 64, 1)
Next i
sumcodes = sc
End Function


----- original message -----

"wildlife guy" wrote:
I see what you are sying joe but i would like to add the values as we

eg. A A B A B 40

"wildlife guy" wrote:

I need to give a numeric value to letters in individual cells. ex. A=10
B=15 c=5.
Do I need to build a chart to reference? I am in need of big help, a magic
formula.

Justin

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to delete a spredsheet in office 2007 brian Excel Discussion (Misc queries) 1 December 28th 08 09:24 AM
How to increase the number of columns in spredsheet Thomi New Users to Excel 6 July 6th 07 01:52 AM
if I already have a Spredsheet, but I wanna add more,How? SPREADSHEETS Excel Worksheet Functions 2 May 4th 06 05:26 PM
How to transfer a sum from one spredsheet to another Therese Excel Discussion (Misc queries) 2 December 21st 05 09:17 PM
I need a work in progress spredsheet Luanne Excel Discussion (Misc queries) 2 August 19th 05 07:25 PM


All times are GMT +1. The time now is 03:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"