Excel Help?

Associate
Joined
2 Dec 2002
Posts
690
Location
Wales
Hi guys, it's probably really simple but I need some help with a spreadsheet I'm doing.

Basically I'm bored so I'm making a simple spreadsheet about my Uni Grades. I need a bit of code for excel so that if the number in cell E4, falls between the number in cell H1 then it needs to return the number 1, if it falls between the numbers in cell I1 it needs to return the number 2 and if it falls between the numbers in J1 it should return the number 3.

If that makes sense, is it possible? and if it is, what's the code?

Thanks in advance.
 
Man of Honour
Joined
25 Oct 2002
Posts
30,265
Location
Hampshire
Don't know the code off by heart but you should be able to do this with an IF statement, basically you put in a check and then a value if true, and a value if false. You could nest the statements so that the value if false performs another if statement.

One thing that might be tricky is when you say "falls between the numbers in cell x" that implies you have multiple numbers in the same cell, it may be wise/easier to split these out into individual cells for comparison (can be done programmatically if a consistent format is used).
 
Top