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 came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

FDibbins

Well-known Member
Joined
Feb 16, 2013
Messages
6,723
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

Guru008

Board Regular
Joined
Dec 19, 2016
Messages
126
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

BarryL

Well-known Member
Joined
Jan 20, 2014
Messages
1,436
Office Version
  1. 2019
Platform
  1. Windows
  2. MacOS
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

watson86

New Member
Joined
Dec 21, 2016
Messages
4
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

Dathoang16

New Member
Joined
Dec 16, 2016
Messages
7
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

watson86

New Member
Joined
Dec 21, 2016
Messages
4
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,191,215
Messages
5,985,314
Members
439,956
Latest member
venky2002

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
Top