Entering a number based on it's position in a range

Scott Krause

Board Regular
Joined
Mar 8, 2009
Messages
96
I'm trying to enter data based on it's position in a range of numbers.

I'm creating a weight lifting program for our HS and need to put a certain number into a cell based on another cell, in this case R4. So here's what I'm trying to get accomplished with IF's below. If R4 is less than 135, enter 30. If R4 is greater than 135 but less than 225, enter 45. If R4 is greater than 225 but less than 315, enter 60. If R4 is greater than 315, enter 75.




=IF(R4<135,30, IF(135<R4<225,45, IF(225<R4<315,75,60)))

Thanks,

Scott Krause
 
Last edited:

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Sorry, here's the full formula I used....



=IF(R4<135,30, IF(135

<R4< p><225,45,
IF(225
<R4<315,75,60)))<R4<315,75,60)))<R4<225,45, p IF(225<R4<315,75,60)))< IF(225<R4<315,75,60)))<R4<225,45,>
 
Last edited:
Upvote 0
I'm trying to enter data based on it's position in a range of numbers.

I'm creating a weight lifting program for our HS and need to put a certain number into a cell based on another cell, in this case R4. So here's what I'm trying to get accomplished with IF's below. If R4 is less than 135, enter 30. If R4 is greater than 135 but less than 225, enter 45. If R4 is greater than 225 but less than 315, enter 60. If R4 is greater than 315, enter 75.



=IF(R4<135,30, IF(135<R4<225,45, IF(225<R4<315,60,75)))
Thanks,

Scott Krause

If statements execute in order... so as long as you go from low to high, this should work

=IF(R4<135,30, IF(R4<225,45, IF(R4<315,60,75)))
 
Upvote 0
Sorry, again, I can't seem to get this entire formula to show up.

=IF
(R4
<135
,30
, IF
(135
<R4
<225,
45,
IF(225
<R4
<315,
75,60)))
 
Upvote 0
The formula was all there...

The forum gets confused and truncates formulas some of the time when they contain < or >.

I simply quoted your original post to see what the formula you typed in was.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,715
Members
448,985
Latest member
chocbudda

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