If Statement

  • Thread starter Thread starter saraskandan
  • Start date Start date
S

saraskandan

I have a set of parameters to find rating for the inputs given by me.


For example


Parameters Rating
1-2 5
3-4 4
5-6 3
7-8 2
9> 1


How would like do this using an if statement
 
Hi

One way, with the number in cell H1

=IF(H1<=2,5,IF(H1<=4,4,IF(H1<=6,3,IF(H1<=8,2,1))))

Regards

Roger Govier
 
Roger,,

Quick question on the same topic.

if i have such a parameter

Para Rating
3 5
1-2 3
0 1

how would do this using if statement
 
Hi

=IF(H1=0,1,IF(H1<=2,3,5))
This assumes that any value above 2 would result in a 5.
If it is only for value 3, and return Null for anything above 3, then

=IF(H1=0,1,IF(H1<=2,3,IF(H1=3,5,"")))
 
Back
Top