IF Statement Question

DMcCallister

Board Regular
Joined
Feb 21, 2013
Messages
60
Just curious if there is a way to reduce the length of my excel formulas that are similar to the following example...

=CEILING(IF(((S6*X47+R48-S56)+(S17*X51+R52-S60))*0.15>20000,20000,((S6*X47+R48-S56)+(S17*X51+R52-S60))*0.15),1000)

So in essence is there a way to avoid having to rewrite the ELSE which is the same as the Logical Test.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Can you explain exactly what you want your formula to do?
 
Upvote 0
I was just wondering if there was a quick way to take the result of the Logical Test and make that the value of the cell with out having to repeat the logical test again, as the Else statement.

So Basically...

Function for Rounding
=CEILING(

Logic Test
IF(((S6*X47+R48-S56)+(S17*X51+R52-S60))*0.15>20000

IF True
,20000

IF False (This is the same as the Logic Test)
,((S6*X47+R48-S56)+(S17*X51+R52-S60))*0.15)

Rounds up to the Thousand
,1000)

I'm just seeing if there is a way to default the cell to the Logic Test value if it is not True since it's basically doing the calculation twice.
Hope that helps.
 
Upvote 0
How about:

=CEILING(MIN(((S6*X47+R48-S56)+(S17*X51+R52-S60))*0.15,20000),1000)

I just replaced your IF function with a MIN function, telling it to take the lesser of your calculation and 2000.
 
Last edited:
Upvote 0
:laugh:
We have all been there at one time or another. Sometimes we can't see the forest for the trees and needlessly complicate something!
 
Upvote 0

Forum statistics

Threads
1,223,270
Messages
6,171,103
Members
452,379
Latest member
IainTru

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