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
R_N_WARDAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
calacucciaConnect With a Mentor Commented:
Hi R N WARD,

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

First, define following table somewhere on your spreadsheet:
  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
 
R_N_WARDAuthor Commented:
Need help ASAP
0
 
R_N_WARDAuthor Commented:
Adjusted points to 60
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
R_N_WARDAuthor Commented:
Adjusted points to 75
0
 
R_N_WARDAuthor Commented:
Adjusted points to 200
0
 
R_N_WARDAuthor 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
 
calacucciaCommented:
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
All Courses

From novice to tech pro — start learning today.