Trouble with < and > formula, dividing into quarters

cjvhowells

New Member
Joined
Jan 26, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi there

I'm an absolute novice when it comes to Excel, and got so far with a lot of trial and error (and youtube videos). Unfortunately I've hit a wall!

I have an item at 4000mm in length, and I'm trying to make a cell that will divide it into quarters depending on the number entered into another cell.

i.e., if 0-1000 is entered into cell A then divide cell B by 0.25, if 1001-2000 is entered into cell A then divide cell B by 0.5 etc.

I've entered the formula below, it's allowing me to enter it without any errors but entering anything over 2000 doesn't seem to have any affect:

=IF(C4<1000,G10*0.25,IF(C4>OR1001,G10*0.5,IF(C4>OR52001G10*0.75,IF(C4>OR4001,G10*1))))

I'm guessing this is something to do with trying to use more than two lesser then/greater than sums in one formula?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
=IF(C4<1000,G10*0.25,IF(C4>OR1001,G10*0.5,IF(C4>OR52001G10*0.75,IF(C4>OR4001,G10*1))))

what are all the ranges

maybe start at the largest and work down

=IF ( C4 > 4000 , G10* 1 , IF( C4 > 2000, G10 * .75 , If( C4 > 1000 , G10*0.5 , G10*0.25 ) ) )
 
Upvote 0
Thanks for the quick response! That seems to be working now, but If( C4 > 1000 , G10*0.25 ) ) ) ) is now giving a result of FALSE

=IF(C4>4000,G10*1,IF(C4>3000,G10*0.75,IF(C4>2000,G10*0.5,IF(C4>1000,G10*0.25))))
 
Upvote 0
you dont have a false in the nested if

so your criteria does not include 0-1000

if you look at mine - i have a false after the >1000

remember the IF works left to right
AND also uses
IF ( Test, True, False)

so when nesting

IF ( Test, True, IF ( Test, True, False))

IF ( Test, True, IF ( Test, True, IF ( Test, True, False)))

=IF(C4>4000,G10*1,IF(C4>3000,G10*0.75,IF(C4>2000,G10*0.5,IF(C4>1000,G10*0.25, NEEDS A FALSE here for less than 1000 ))))

otherwise the formula just returns FALSE

can put a "" so leave blank or 0 to put a zero if less than 1000
 
Upvote 0
Solution
Maybe
Excel Formula:
=IF(C4<1000,G10*0.25,IF(C4<2000,G10*0.5,IF(C4<3000,G10*0.75,G10)))
 
Upvote 0
Correction to my previous formula
Excel Formula:
=IF(C4<=1000,G10*0.25,IF(C4<=2000,G10*0.5,IF(C4<=3000,G10*0.75,G10)))
 
Upvote 0

Forum statistics

Threads
1,215,473
Messages
6,125,018
Members
449,203
Latest member
tungnmqn90

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