473,466 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do I take an average of alphanumerics?

2 New Member
Hi folks,
Hoping you can help me out.
At uni we have an alpha-numeric grading system, where A16 is a top pass and F1 is an abject fail. I need to average the grades for 2 semesters.
I'm thinking that I need to remove the letter take the average and then put on a new calculated letter (eg.
A16 + F2 gives an average of C9)but don't know where to begin.
Any hints would be very much appreciated.
Cheers muchly
Nick
Dec 13 '10 #1
4 2558
ADezii
8,834 Recognized Expert Expert
Hello Nick:
  1. Where, exactly, are these Grades stored? I'm assuming that they are stored in a Related Table Linked by some sort of [ID] Field to a Parent Table, but only you can tell me this info.
  2. Kindly Post all the possible Grades, along with their corresponding Values.
  3. List your Table(s) structure along with Field names and Data Types.
  4. Once we have this, and any other relevant info, we can then proceed.
Dec 13 '10 #2
Nick Richards
2 New Member
Hi, thanks for the super quick response.
The grades are in a table called Raw Data, the field names are 'Semester 1 Grade' and 'Semester 2 Grade' both fields are text fields.
The achievable grades are A16, A15, A14, B13, B12, B11, C10, C9, C8, D7, D6, D5, E4, F3, F2 and F1. They don't have corresponding values, I want to average the numerical parts of the grade.
Thanks again
Dec 13 '10 #3
ADezii
8,834 Recognized Expert Expert
Expand|Select|Wrap|Line Numbers
  1. A16 + F2 gives an average of C9
  1. An Average of the Numerical Components equals 9, but what is the logic for arriving at the 'C'?
  2. What would the Averages be for : A14 <==> B13, E4 <==> B11, etc.?
Dec 13 '10 #4
hype261
207 New Member
It seems to me that your values go from 1 to 16. So why don't you drop the character at the beginning of each grade then average them together and then add the character back on? Wait I just reread your original post and you mentioned this. Here is how I would do it.

Expand|Select|Wrap|Line Numbers
  1. dim average as integer
  2.  
  3. average = (CInt(Right(gradeOne,Len(gradeOne)-1)) + CInt(Right(gradeTwo,Len(gradeTwo)-1))) /2
  4.  
  5.  
Dec 13 '10 #5

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

Similar topics

0
by: Sara | last post by:
I am trying to find the average number of products of the set that is on rows...dynamically. For example, if I had states on rows and was looking at the average number of products, I would see...
5
by: Nader | last post by:
Hi everyone, In C# how do you verify if a string is alphanumeric? Thanks for suggestions.
6
by: J | last post by:
Kind of new at programming/vb.net. I'm doing this junky die roller program. Heres's what is supposed to happen: Roll 2 6-sided dies. Add rolls together put total in rolls(d6total). Display...
4
by: Gary | last post by:
Hi, I have a temperature conversion program down pat, but I was told to add an average, meaning, i need to get the average temperature for as many times as it was entered. i do not know where to...
3
by: C++Geek | last post by:
I need to get this program to average the salaries. What am I doing wrong? //Program to read in employee data and calculate the average salaries of the emplyees.
3
by: mochatrpl | last post by:
I am looking for a way to make a query / report display the running average for total dollars. I have already set up a query to provide totals dollars per day from which a report graphly shows...
3
by: Salad | last post by:
http://www.mathwords.com/w/weighted_average.htm At the above link gives an example of a weighted average. It uses the following example: Grades are often computed using a weighted average....
17
nitindel
by: nitindel | last post by:
Hi All, I have a text box and want to validate it like this: I want to enter Numerics or alphanumerics in the text box but not Alphabets alone.If Alphabets alone entered then...
5
by: p3rk3le | last post by:
So, I'm about to do a sequential search on a table (n contents) of random numbers. I have to print the average between the number of comparisons and the contents of the table (n) and the...
1
by: Ormazd | last post by:
Hello, I was wondering if anyone might be able to help me with a little PERL script? I'm very new and I have been given a task to write a simple Perl script that prints out the file names and...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.