If Functions

watson86

New Member
Joined
Dec 21, 2016
Messages
4
I am trying to create a series of IF functions so that the cell will register a number based on the value of the previous cell. Basically something like this:
If S6>=30, then S7 should read 25
If S6 is between 31-59, then S7 should read 20
If S6 is between 60-75, then S7 should read 15
If S6 is between 76-89, then S7 should read 10
If S6 is between 90-100, then S7 should read 3

I have tried nesting the cells and using a variety of symbols, but still nothing is working :( it will give me the "25" value but nothing else.

I would greatly appreciate some help!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Welcome to the forum :)

I would do this with a small table, and use VLOOKUP...
A​
B​
C​
D​
2​
30​
25​
70​
20​
3​
59​
20​
4​
75​
15​
5​
89​
10​
6​
100​
3​
D2=VLOOKUP(C2,$A$2:$B$6,2,1)
 
Upvote 0
Hi,

There is logical error in your formulae

S6>=30, then S7 should read 25 should be "S6<=30, then S7 should read 25" because if we use >= for value 25 then every next condition will be fulfil as all the condition have value greater than 30, thats why your formula is giving 25 everytime

 
Upvote 0
Hi
I think this formula may work

= lookup(S6,{30,31,60,76,90},{25,20,15,10,3})

I'm not sure but I think maybe the OP wants 25 for everything up to and including 30. If that's the case I'll amend your formula slightly

=LOOKUP(S6,{0,31,60,76,90},{25,20,15,10,3})
 
Upvote 0
I'm not sure but I think maybe the OP wants 25 for everything up to and including 30. If that's the case I'll amend your formula slightly

=LOOKUP(S6,{0,31,60,76,90},{25,20,15,10,3})


I pasted this in the cell and it didn't work. Thank you.
 
Upvote 0
Does it show #N/A in the cell?

You can try this formula work

=LOOKUP(Value(S6),{0,31,60,76,90},{25,20,15,10,3})
 
Last edited:
Upvote 0
So far, none have worked. They all return the first value of 25, but nothing else when the value in S6 changes.
 
Upvote 0

Forum statistics

Threads
1,214,793
Messages
6,121,619
Members
449,039
Latest member
Mbone Mathonsi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top