Data Validation - HELP Needed Please

bjackson3

New Member
Joined
Feb 18, 2010
Messages
18
Trying to create a spreadsheet that helps me track my students high school coursework. Have been using Data Validation with drop down lists because it seems to keep everything neat and simple. Have run into a problem, and do not know what to do. Will be posting HTML below, but in a nutshell, here is issue:

Grading scale is different this year versus previous years. This year an A=90-100; B=89-80; C=79-70 and D=69-60 Previous years grading scale was A=93-100; B=85-92; C=84-77 and D=76-70. This was all for a a 1 credit course.

An "A" is "worth" 4 points, B 3 points, C 2 points and D 1point. Of course, if course completed was a 1/2 credit then all of above point worths change by half.

Some courses may be HONORS and some may be AP level. Point values change for these courses as well. Any HONORS course will have an additional .5/.25 points added to worth and and AP course will have an additional 1/.5 points.

I want to be able to simply click and choose COURSE, CREDIT, GRADE, Pre 16-17, HONORS/AP and have the QPts show up depending on what was selected.

Am I trying to do too much?

Here is the MrExcel HTML code:


Book1
ABCDEFGHIJKLMNOPQR
1
2
3
4COURSECREDITGRADEHON/APPRE 16-17?Q. PTS
5English 1182NOYES2
6English 2CP182NONO3
7English 3H182HONORSNO3.5
8
9
10For 1 Credit CourseFor .5 Credit Course
11Pre 16-17 Grade ScaleQ PTSIf HonIf APQ PTSIf HonIf AP
12A = 100-9344.5522.252.5
13B = 92-8533.541.51.752
14C = 84-7722.5311.251.5
15D = 76-7011.520.50.751
16
17
18For 1 Credit CourseFor .5 Credit Course
1916-17 & Beyond ScaleQ PTSIf HonIf APQ PTSIf HonIf AP
20A = 100-9044.5522.252.5
21B = 89-8033.541.51.752
22C = 79-7022.5311.251.5
23D = 69-6011.520.50.751
24
25
26Formula in Sentence form: If credit equal 1 and Pre 16-17 equals yes and grade between 93 and 100 and
27honors/ap equals no then QPts equal 4 Else If credit equals .5 and Pre 16-17 equals yes and grade between
2893 and 100 and honors/ap equals no then QPts equal 2 Else if credit equals 1 and Pre 16-17 equals yes and grade
29between 93 and 100 and honors/ap equals HONORS then QPts equals 4.5 else if credit equals .5 and Pre 16-17
30equals yes and grade between 93 and 100 and honors/ap equals HONORS then QPts equals 2.25
31
32Would have to repeat all of above REPLACING "honors" with "AP" and changing QPts accordingly
33
34THEN
35
36Repeat for QPts if Pre 16-17 equals NO and change QPts
37
38THEN
39
40Repeat all for other grade levels
41
42There has to be a simpler way.
43
Sheet1
Cell Formulas
RangeFormula
M12=4.5/2
M13=3.5/2
M14=2.5/2
M20=4.5/2
M21=3.5/2
M22=2.5/2
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
I assembled this example algorithm that might help you track your students' (with the apostrophe) high school coursework regarding the English language.

I assume you will have Data Validation for each section of the record, as I do for Pre1617, Credit and Honours/AP.

ABCDEFGHI
1Data Validation:CREDITHON/APPRE1617
2FullAPNO
3HalfHONOURSYES
4NO
5
6Full-Credit CourseHalf-Credit Course
7GradePre16173Post1617Q PTSIf HonIf APQ PTSIf HonIf AP
8A10010044.5522.252.5
9B928933.541.51.752
10C847922.5311.251.5
11D766911.520.50.751
12F7060000000
13
14RECORDS
15COURSECREDITGRADEHON/APPRE1617Q. PTS
16English 1Full82NOYES2
17English 2CPFull82NONO3
18English 3HFull82HONOURSNO3.5
19English PossessivesHalf75APYES1
20English PronounsHalf5NONO0
21English SpellIngHalf17HONOURSYES0

<tbody>
</tbody>
Sheet27

Worksheet Formulas
CellFormula
F16=INDEX($D$8:$I$12,MATCH(C16,IF(E16="yes",$B$8:$B$12,$C$8:$C$12),-1),LOOKUP(B16,$B$2:$B$3,{1;2})*LOOKUP(D16,$D$2:$D$4,{3;2;1}))

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:
Upvote 0
DRSteele - Entered your formulae, etc into a new worksheet, but have been getting errors in computing Q Pts. Made a sample sheet showing your work and QPTs assigned compared to what points SHOULD be assigned. Thank you in advance for looking and offering more assistance.

ABCDEFGHI
1Data Val:CREDITHON/APPRE1617
2FullAPNO
3HalfHON YES
4NO
5
6Full Credit CourseHalf Credit Course
7GRADEPre1617Post1617Q PtsIf HonIf APQ PtsIf HonIf AP
8A10010044.5522.252.5
9B928933.541.51.752
10C847922.5311.251.5
11D766911.520.50.751
12F7060000000
13
14
15CourseCreditGradeHon/APPre1617Q Pts **Q Pts Should Equal**
16Sample 1Full90NoYES3.003.00check
17Sample 2Full90HONYES4.003.50high by .5
18Sample 3Full90APYES4.004.00check
19Sample 4Half90NoYES3.501.50high by 2
20Sample 5Half90HONYES2.001.75high by .25
21Sample 6Half90APYES2.002.00check
22
23Sample 8Full90NoNo4.004.00check
24Sample 9Full90HONNo5.004.50high by .5
25Sample 10Full90APNo5.005.00check
26Sample 11Half90NoNo4.502.00high by 2.5
27Sample 12Half90HONNo2.502.25high by .25
28Sample 13Half90APNo2.502.50check
29
30Sample 15Full80NoYES2.002.00check
31Sample 16Full80HONYES3.002.50high by .5
32Sample 17Full80APYES3.003.00check
33Sample 18Half80NoYES2.501.00high by 1.5
34Sample 19Half80HONYES1.501.25high by .25
35Sample 20Half80APYES1.501.50check
36
37Sample 21Full80NoNO3.003.00check
38Sample 22Full80HONNO4.003.50high by .5
39Sample 23Full80APNO4.004.00check
40Sample 24Half80NoNO3.501.50high by 2
41Sample 25Half80HONNO2.001.75high by .25
42Sample 26Half80APNO2.002.00check

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1
F16 and filled below formula: =INDEX($D$8:$I$12,MATCH(C16,IF(E16="yes",$B$8:$B$12,$C$8:$C$12),-1),LOOKUP(B16,$B$2:$B$3,{1;2})*LOOKUP(D16,$D$2:$D$4,{3;2;1}))
 
Last edited:
Upvote 0
I'm so sorry, I made a terrible mistake. How embarrassing.

The error was in the [column number] argument in the function INDEX. This formula ought to do it.

Worksheet Formulas
CellFormula
F16=INDEX($D$8:$I$12,MATCH(C16,IF(E16="yes",$B$8:$B$12,$C$8:$C$12),-1),LOOKUP(B16,$B$2:$B$3,{0;3})+LOOKUP(D16,$D$2:$D$4,{3;2;1}))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

<strike></strike>
 
Upvote 0
Hey, no problem about a mistake. We are all human! I'm really trying to study your formula and figure out how it is working. In using your new formula, I am still getting an error, but only with AP courses (adding copy of my sheet for you to see.) I can see what is going on with the "IF" statement, but in the LOOKUP part, what do the numbers in the curly brackets stand for/represent {3;2;1} and {0;3}? Thanks for the help - can you assist with the AP point references?

Data ValCREDITHON/APPRE1617
FULLHONNO
HALFAPYES
NO
IF FULL CREDITIF HALF CREDIT
GRADEPRE1617Post1617QPTSIf HONIf APQPTSIf HONIf AP
A10010044.5522.252.5
B928933.541.51.752
C847922.5311.251.5
D766911.520.50.751
F7060000000
COURSECREDITGRADEHON/APPRE1617QPTSCorrect QPTS
Sample 1FULL90NOYES3.003.00check
Sample 2FULL90HONYES3.503.50check
Sample 3FULL90APYES3.504.00low by .5
Sample 4HALF90NOYES1.501.50check
Sample 5HALF90HONYES1.751.75check
Sample 6HALF90APYES1.752.00low by .25
Sample 8FULL90NONO4.004.00check
Sample 9FULL90HONNO4.504.50check
Sample 10FULL90APNO4.505.00low by .5
Sample 11HALF90NONO2.002.00check
Sample 12HALF90HONNO2.252.25check
Sample 13HALF90APNO2.252.50low by .25
FORMULA IN CELL F16 and filled down:
=INDEX($D$8:$I$12,MATCH(C18,IF(E18="yes",$B$8:$B$12,$C$8:$C$12),-1),LOOKUP(B18,$B$2:$B$3,{0;3})+LOOKUP(D18,$D$2:$D$4,{3;2;1}))

<colgroup><col span="2"><col span="2"><col><col span="2"><col><col span="6"></colgroup><tbody>
</tbody>
 
Last edited:
Upvote 0
You've created the error by re-arranging the HON/AP data validation list: it must be in alphabetical order for function LOOKUP to report the correct result. Put it back as AP, HON, NO.

The formula LOOKUP(B18,$B$2:$B$3,{0;3}) looks up a criteria (in our case B18 is FULL) in a vector (in our case $B$2 to $B$3,) which is our list that evaluates to the array {FULL;HALF}, and determines which position the match holds (in our case 1); it then reports the first (from the 1) item in the results_vector, which is the array {0;3}, and the formula reports a 0. To this 0 we will add the result of the next LOOKUP (which is 2), the sum then being 2. That sum is the column number argument from function INDEX. So, after the other arguments to function INDEX have been evaluated, it will report the Q.PTS (which is 3.5) from the table to which it refers.

Watch these videos, which might help you understand function LOOKUP. Videos are far superior to prose in demonstrating the functionality of excel.

https://www.youtube.com/watch?v=aleaMFPk4-I
https://www.youtube.com/watch?v=HqXEcu22EaY
 
Upvote 0
Thanks for the explanation - seems confusing but going to study this more and watch the video links you provided. Changed the list back to alphabetical but still getting QPTS for HON a half point off. Thanks again - never heard about the INDEX/VECTOR in Excel before.
 
Upvote 0
I suspect we've got things all out of line. Here is my entire model.

ABCDEFGHI
1Data Validation:CREDITHON/APPRE1617
2FullAPNO
3HalfHONYES
4NO
5
6Full-Credit CourseHalf-Credit Course
7GradePre1617Post1617Q PTSIf HONIf APQ PTSIf HONIf AP
8A10010044.5522.252.5
9B928933.541.51.752
10C847922.5311.251.5
11D766911.520.50.751
12F7060000000
13
14RECORDS
15COURSECREDITGRADEHON/APPRE1617Q. PTS
16English 1Full82NOYES2
17English 2CPFull82NONO3
18English 3HFull82HONNO3.5
19English PossessivesHalf75APYES1
20English PronounsHalf5NONO0
21English SpellingHalf17HONYES0
22English SpellingHalf90HONYES1.75BJACKSON3 manual
23Sample 1Full90NoYES33
24Sample 2Full90HONYES3.53.5
25Sample 3Full90APYES44
26Sample 4Half90NoYES1.51.5
27Sample 5Half90HONYES1.751.75
28Sample 6Half90APYES22
29Sample 8Full90NoNo44
30Sample 9Full90HONNo4.54.5
31Sample 10Full90APNo55
32Sample 11Half90NoNo22
33Sample 12Half90HONNo2.252.25
34Sample 13Half90APNo2.52.5
35Sample 15Full80NoYES22
36Sample 16Full80HONYES2.52.5
37Sample 17Full80APYES33
38Sample 18Half80NoYES11
39Sample 19Half80HONYES1.251.25
40Sample 20Half80APYES1.51.5
41Sample 21Full80NoNO33
42Sample 22Full80HONNO3.53.5
43Sample 23Full80APNO44
44Sample 24Half80NoNO1.51.5
45Sample 25Half80HONNO1.751.75
46Sample 26Half80APNO22

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet27

Worksheet Formulas
CellFormula
F16=INDEX($D$8:$I$12,MATCH(C16,IF(E16="yes",$B$8:$B$12,$C$8:$C$12),-1),LOOKUP(B16,$B$2:$B$3,{0;3})+LOOKUP(D16,$D$2:$D$4,{3;2;1}))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:
Upvote 0
DRSteele - I feel SO DUMB!!! The "errors" I kept getting for the HON courses were not a result of copying wrong, it was the result of not keying in the proper text string! DOH! In the data validation section at top of sheet, D1 has HON/AP. When I typed HON in cell D3, I had to include a "space bar" so the /AP wouldn't show up. Thus, when I keyed HON and DIDN'T include a "space" Excel was not ready correctly. You, my friend, are a lifesaver for having so much patience. Thank you again!
 
Upvote 0

Forum statistics

Threads
1,215,430
Messages
6,124,849
Members
449,194
Latest member
HellScout

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top