473,322 Members | 1,496 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

efficient summing of letter-parts of a word...

2
i have a list of names
each name is spelt differently
each letter needs a numeric value assigned to it
e.g. a = 1, b = 2, c = 3, and so on....
i need to sum these letter values for each name-instance.

i would like to do this in MSAccess as well as MSExcel

what is the most efficient way of doing this ?

tafco
Nov 3 '09 #1
4 1498
Delerna
1,134 Expert 1GB
THE most efficient way ????
Where
in an SQL Query?
in VBA code?
In other?

What criteria is involved? Different scenarios would have different efficiencies from any particular method....I feel


One way would be to determine the ascii code of each leter and subtract the ascii value of b.
That will get you a number for each letter.
Thats a simple statement, its more involved than that but you get the idea
eg. lowercase verses uppercase
Nov 3 '09 #2
tafco
2
this should be done in VBA code ...

:)
Nov 3 '09 #3
missinglinq
3,532 Expert 2GB
And how do you want to handle lowercase vs uppercase? Do you want a and A to have the same value?

These will give you the same value for both

Asc(UpperCaseLetter)-64

Asc(LowerCaseletter)-96

If you want the same value, for both uppercase and lowercase, convert the string to one, say lowercase, then parse them with

Asc(LowerCaseletter)-96

Welcome to Bytes!

Linq ;0)>
Nov 3 '09 #4
NeoPa
32,556 Expert Mod 16PB
The most efficient way is to write a VBA function that returns the sum of the values. There is no shortcut. No inbuilt function or process whereby this may be done for you.

I suggest that you start work on this and let us know if you have any problems with it.

I include an excerpt of some instructions I sometimes need to give to clarify the position.

Before posting any question you are expected to attempt to find and work on a solution. When you find a specific problem with your attempt, that is the time to post here requesting assistance with any difficulties you have or about a particular function of the code that you don't know how to achieve. When posting your problem, details of the problem itself and where it's found are the bare minimum information required. The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you.

Code may be posted for reference purposes, but please don't expect us to work out the meaning of your problem by reverse-engineering your code. The question you post must make sense in its own right.
Nov 3 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Yaroslav Bulatov | last post by:
I made an array of 10 million floats timed how long it takes to sum the elements, here's what I got (millis): gcc -O2: 21 Python with numarray: 104 Python with Numeric: 302...
12
by: Alan J. Flavell | last post by:
OK, today's email brought a comment from a reader, pointing out something that I'd long since noticed myself but hadn't done anything about it. On my pages, I've got a first-letter style on...
2
by: SunMan | last post by:
Hello! I am trying to create a program that will ask for a user to enter a series of letters (codes) and then print out a table that shows the codes in decending frequency. Only letters will be...
2
by: Targa | last post by:
<input NAME="TAXRATE" onBlur="this.form.TAX.value = (this.form.TAXRATE.value - 0) * (this.form.ITEM1TOTAL.value - 0) + (this.form.ITEM2TOTAL.value - 0) " Size="4"> In my TAX field I get...
7
by: Hank | last post by:
I have a report-summing problem using Access 2000. When a section runs over the end of the page, sometimes a detail gets picked up twice. Example: Customer Header XYZ Company Detail Section...
18
by: Eirik WS | last post by:
Is there a more efficient way of comparing a string to different words? I'm doing it this way: if(strcmp(farge, "kvit") == 0) peikar_til_glas_struktur->farge = KVIT; if(strcmp(farge, "raud") ==...
5
by: Peter Jansson | last post by:
Hello group, The following code is an attempt to perform URL-decoding of URL-encoded string. Note that std::istringstream is used within the switch, within the loop. Three main issues have been...
5
by: Alan Little | last post by:
I have affiliates submitting batches of anywhere from 10 to several hundred orders. Each order in the batch must include an order ID, originated by the affiliate, which must be unique across all...
15
by: Macca | last post by:
Hi, My app needs to potentially store a large number of custom objects and be able to iterate through them quickly. I was wondering which data structure would be the most efficient to do this,a...
7
by: lethek39 | last post by:
Hey I have been trying to figure out how to sum rows and columns in a matrix square. I also have been trying to get the program to list the numbers of the diagonal in the matrix. So far this is the...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.