Any syntax to shorten really long IF(formula-test , value-if-true , result of formula) cells?

d0rian

Active Member
Joined
May 30, 2015
Messages
313
Office Version
  1. 365
I find myself using the following syntax quite a bit, which is resulting in really long text strings that contain a lot of duplicative text...thinking there's got to be a way to shorten them:

Let's say column C has a really-long-formula, but I decide that if the result of the formula is negative, I simply want it to return 0. So what I've been doing for ages is modifying the formula to:
=IF((really-long-formula)<0 , 0 , really-long-formula)

When the formula's REALLY long, it seems really inefficient to make me type out the whole thing twice (and makes troubleshooting a PITA). Is there a better syntax I can use that will only require me to include the really long string once?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Yeah, that would work for this particular example, but I just made it up for ease of understanding; usually that "value-if-true" value is more complicated, sometimes a formula in its own right. I was just hoping there was an Excel formula / syntax I'm unaware of, because usually I find that any time there's a truly duplicative instance, like in my OP, there's a more efficient way to be doing things...
 
Upvote 0
I mean, I could go find an old spreadsheet where I've used this syntax and paste it here, but I'm not looking to solve for just a single permutation of it -- this is a Q I've been meaning to ask for a long time, since it seems to crop up with nearly every excel model I build.
 
Upvote 0
It's going to be difficult to improve on something that no one can see. There are a lot of ways around IF statements, but it all depends on what you're trying to accomplish.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,858
Members
449,051
Latest member
excelquestion515

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