# NEWBE

I am a beginer in VISBASIC and need some help.  I want to instruct the computer to take a value from a cell (namely, N3) in an Excel database, devide it by another cell (N21) take the sum and give it a text value (ex. "A","A-","B+", ect.),and ,finaly, Print the text value to (O3).  Please E-Mail Me if You have a suggestion
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Author Commented:
Need help ASAP
0
Author Commented:
0
Author Commented:
0
Author Commented:
0
Commented:
Hi R N WARD,

I suppose you are using Excel and trying to transform a numeric note into a letter note.

0      F-
1      F
2      E
3      D
4      C-
5      C
6      B
7      B+
8      A-
9      A

Now, select all the cells in this table and name it "noteTable" (Menu Bar/Insert/Name/Define, Type name noteTable (without brackets), and prss OK button)

Go to cell O3 and type following formula:

=VLOOKUP(N3/N21;noteTable;2;TRUE)

If N3/N21 is equal to 8,9 for example, the function will attribute the note "A-", because he looks for the highest value in noteTable lower than N3/N21.

Enter, if error shows up, replace all ";" by "," (other separator format)

Now imagining, you have to do the same calculation for cells N4 to N20 and put the note in cells O4 to O20, first change the formula you just entered (the dollar sign before 21 will lock the dividing cell 21 when copying and pasting the formula down)

=VLOOKUP(N3/N\$21;noteTable;2;TRUE)

Now higlight this cell, copy it and perform a paste on cell O4 to O20

Hope this helps (let me know by adding a comment here)

Geert

0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
Good answer, but the computer was giving students with a 100% score a "F".

I have already receaved an answer from another source, but It would help me if you could help me out with the VB-basics.  Conntact me at R_N_WARD@HOTMAIL.COM
0
Commented:
All right RN Ward,

I think the remaining problem is that your N21 cell contains the total number of points. It's logic in that case you get an F for 100% score points (the division gives a 1 result, an a 1 was defined in the "noteTable" as F.

Now there are two ways to make this work:

1) Redefine the "noteTable" (no need for doing all steps mentioned above, just do as I say):

Instead of linking your notes to numbers 0 to 9, you redefine the numbers as fractions: 0, 0.1, 0.2,...,0.9

If you want a display in percent, select the fractions, go to Menu Bar/Format/Cells/ Tab Number - Select "Percentage", and look at your sheet.

2) Instead of writing the total number of points in cell N21, you divide this number by ten (10), e.g. for a test of 320 points, write 32 in cell N21

This should help,

Calacuccia
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.