Display a value based on a range

Solved
whoisbuch Posted messages 6 Status Membre -  
whoisbuch Posted messages 6 Status Membre -
Hello,
I'm contacting you because I'm stuck on an Excel problem.

Basically, I have a column of numbers ranging from 0 to 50.
Next to it, in another column, I would like to automatically display a number between 0 and 10 that would depend on a range:

Example:
- display 0 if the number is less than 6
- display 7.5 if the number is between 25 and 28
- display 9 if the number is between 40 and 47
- ...

How could I do this?

Thank you very much!

3 réponses

PHILOU10120 Posted messages 6463 Registration date   Status Contributeur Last intervention   833
 
Hello

Try this the value is in A1 for this example

=IF(A1<6,0,IF(AND(A1>=25,A1<=28),7.5,IF(AND(A1>=40,A1<=47),9,"")))

--
It is by forging that one becomes a blacksmith. - It is at the foot of the wall that one sees the mason - one always learns from their mistakes.
1
whoisbuch Posted messages 6 Status Membre
 
Sure, and can I perform several nested range sorts within this?
0
PHILOU10120 Posted messages 6463 Registration date   Status Contributeur Last intervention   833 > whoisbuch Posted messages 6 Status Membre
 
Hello whoisbich

In this case, you can put a reference instead of a value, it will be easier to make adjustments

=IF(A1<C1,0,IF(AND(A1>=C2,A1<=C3),7.5,IF(AND(A1>=C4,A1<=C5),9,"")))
and we can put dropdown lists on these cells to adjust your ranges.
0
whoisbuch Posted messages 6 Status Membre > PHILOU10120 Posted messages 6463 Registration date   Status Contributeur Last intervention  
 
Yes, but if I have 21 forks... won't that be too many for the attributes in the IF function?
0
PHILOU10120 Posted messages 6463 Registration date   Status Contributeur Last intervention   833
 
HELLO

Can you upload the file to cjoint.com
With a table, it might be easier to find the ranges of values

--
It is by forging that one becomes a blacksmith. - It is at the foot of the wall that one sees the mason - one always learns from their mistakes
0
countcalculate
 
Calculate and Count Things With Countcalculate. http://www.en.countcalculate.com/
0
whoisbuch Posted messages 6 Status Membre
 
Here are the forks in the file ;)

https://www.cjoint.com/c/FJhqCphaCm7

And a big thank you for looking into my problem!
0
PHILOU10120 Posted messages 6463 Registration date   Status Contributeur Last intervention   833
 
Hello Whoisbuch

Your file

http://www.cjoint.com/c/FJhqPEUDSTx

--
It is by forging that one becomes a blacksmith. - It is at the foot of the wall that one sees the mason - one always learns from their mistakes.
0
whoisbuch Posted messages 6 Status Membre
 
Awesome, great!!! Thank you very much for this work!
0