Where is the bug in my array?

  • Thread starter Thread starter Gail Gurman
  • Start date Start date
G

Gail Gurman

I've created an array of grade values:

{"A+","A","A-","B+","B","B-","C+","C","C-","D+","D","D-","F";4.3,4,3.7,3.3,
3,2.7,2.3,2,1.7,1.3,1,0.7,0.5}

The problem is that when use LOOKUP to look for "C-", I get 2.7 (which is
the value for B-) when I should get 1.7. (I.e., LOOKUP("C-", Array) returns
2.7, where Array is the array above.)

Here is the same array, formatted in rows (all I did was copy and paste it
into Notepad and add spaces):

{"A+","A","A-","B+","B","B-","C+","C","C-","D+","D","D-","F";
4.3, 4, 3.7, 3.3, 3, 2.7, 2.3, 2, 1.7, 1.3, 1, 0.7, 0.5}

Can anyone see what is causing this error?

Thanks in advance!
 
I've created an array of grade values:

{"A+","A","A-","B+","B","B-","C+","C","C-","D+","D","D-","F";4.3,4,3.7,
3.3, 3,2.7,2.3,2,1.7,1.3,1,0.7,0.5}
The problem is that when use LOOKUP to look for "C-", I get 2.7 (which
is the value for B-) when I should get 1.7. (I.e., LOOKUP("C-", Array)
returns 2.7, where Array is the array above.)
Can anyone see what is causing this error?

Yet again, I solved my own problem. Turns out the elements in the first row
have to be in ascending order, so they have to be {"A","A-","A+",...}.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top