#1   Report Post  
Cletus Stripling
 
Posts: n/a
Default Nested If's

I have a need where I have more than 7 conditions to check for and am
not sure the best approach to tackle the task. Any advice appreciated.

I have a range of various GPA's and want to assign a student a score
based on the range their GPA falls in.

3.94-4.0 75
3.81-3.93 70
3.68-3.80 65
3.54-3.67 60
3.40-3.53 55
3.25-3.39 50
3.10-3.24 45
2.95-3.09 40
2.80-2.94 35

So for example,
GPA Score
Student 1 3.95 75
Student 2 3.70 65
Student 3 2.80 40

Is the best approach for something like this to use visual basic? Anyone
know an easy solution?

Thanks!
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi Cletus

You can use a worksheetfunction to do this
http://www.cpearson.com/excel/excelF.htm#Grades

Or on the worksheet make a list with GPA's and scores and use
A Vlookup formula


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Cletus Stripling" wrote in message ...
I have a need where I have more than 7 conditions to check for and am not sure the best approach to tackle the task. Any advice
appreciated.

I have a range of various GPA's and want to assign a student a score based on the range their GPA falls in.

3.94-4.0 75
3.81-3.93 70
3.68-3.80 65
3.54-3.67 60
3.40-3.53 55
3.25-3.39 50
3.10-3.24 45
2.95-3.09 40
2.80-2.94 35

So for example,
GPA Score
Student 1 3.95 75
Student 2 3.70 65
Student 3 2.80 40

Is the best approach for something like this to use visual basic? Anyone know an easy solution?

Thanks!



  #3   Report Post  
bill k
 
Posts: n/a
Default


set up a table first
0 10
2.80 35
2.95 40
3.10 45
3.25 50
3.40 55
3.54 60
3.68 65
3.81 70
3.94 75
4.01 100

note: the left column must be increasing values
and I entered some extra values for the outside ranges just in case

use the vlookup formula to get the second column values

=VLOOKUP(B1,$C$1:$D$11,2,TRUE)

where B1 is the score for the student.
$C$1:$D$11 is the table
2 indicates the second column in the table.

note 2.8 will get 35 not 40 ( : ))

extend the formula down the list

have fun


--
bill k


------------------------------------------------------------------------
bill k's Profile: http://www.excelforum.com/member.php...nfo&userid=821
View this thread: http://www.excelforum.com/showthread...hreadid=471935

  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

Cletus

=LOOKUP(cellref,{0,2.8,2.95,3.1,3.25,3.4,3.54,3.68 ,3.81,3.94},{"fail",35,40,45,50,55,60,65,70,75})

where cellref is student score.

Also.......I believe you made an error in typing.

Student 3 at 2.80 would be a 35 GPA(2.80-2.94)


Gord Dibben Excel MVP

On Thu, 29 Sep 2005 16:58:33 -0400, Cletus Stripling wrote:

I have a need where I have more than 7 conditions to check for and am
not sure the best approach to tackle the task. Any advice appreciated.

I have a range of various GPA's and want to assign a student a score
based on the range their GPA falls in.

3.94-4.0 75
3.81-3.93 70
3.68-3.80 65
3.54-3.67 60
3.40-3.53 55
3.25-3.39 50
3.10-3.24 45
2.95-3.09 40
2.80-2.94 35

So for example,
GPA Score
Student 1 3.95 75
Student 2 3.70 65
Student 3 2.80 40

Is the best approach for something like this to use visual basic? Anyone
know an easy solution?

Thanks!


  #5   Report Post  
Cletus Stripling
 
Posts: n/a
Default

You're right! Typo! Excatly what I was looking for...many thanks!

Gord Dibben wrote:
Cletus

=LOOKUP(cellref,{0,2.8,2.95,3.1,3.25,3.4,3.54,3.68 ,3.81,3.94},{"fail",35,40,45,50,55,60,65,70,75})

where cellref is student score.

Also.......I believe you made an error in typing.

Student 3 at 2.80 would be a 35 GPA(2.80-2.94)


Gord Dibben Excel MVP

On Thu, 29 Sep 2005 16:58:33 -0400, Cletus Stripling wrote:


I have a need where I have more than 7 conditions to check for and am
not sure the best approach to tackle the task. Any advice appreciated.

I have a range of various GPA's and want to assign a student a score
based on the range their GPA falls in.

3.94-4.0 75
3.81-3.93 70
3.68-3.80 65
3.54-3.67 60
3.40-3.53 55
3.25-3.39 50
3.10-3.24 45
2.95-3.09 40
2.80-2.94 35

So for example,
GPA Score
Student 1 3.95 75
Student 2 3.70 65
Student 3 2.80 40

Is the best approach for something like this to use visual basic? Anyone
know an easy solution?

Thanks!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested Subtotals in Excel 2002 KG Excel Discussion (Misc queries) 2 September 10th 05 11:51 AM
Why are my nested sub-totals are displaying incorrectly? chiefdean13 Excel Discussion (Misc queries) 1 July 20th 05 05:45 AM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM
how can I exceed the nested if fuction limit Mike Excel Discussion (Misc queries) 0 January 30th 05 12:17 AM
€śUse of more then 7 nested if statement€ť Faisal Yameen Excel Worksheet Functions 3 January 12th 05 06:02 PM


All times are GMT +1. The time now is 06:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"