Shortening If-Then equations

spacely

Board Regular
Joined
Oct 26, 2007
Messages
248
Hi,

I have excel 2016. I wonder if there's a shorter way to do If-Then, to not repeat an emvedded equation twice, in one cell.


If (big-long-thing=-10000, then "", big-long-thing)

Want to avoid double length equations in excel, if I can.

Thanks!
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
If you give a formula then we may try to shorten it. As of now it looks fine
 
Upvote 0
Hi Spacy,

Long excel formulas are typical, and as long as thinking out logically then it can be as big as needed instead of shortening it. If you do feel your formula is overlapping or causing issues you are more than welcome to post it and see if we can sort you out!
 
Upvote 0
Almost! And brilliant. Corrected:

=IFERROR((1 / (1 / (-10001 + 10000)))-10000, "")

Tested the -10001 varying any value, when it passes through -10000 it returns the blank, otherwise returns the value entered.
 
Upvote 0
Well shoot. It looks to return the same number, but apparently it's off a little? Because an If-Then can't recognize the value anymore, although it looks the same ...
 
Upvote 0
Oops:

A​
B​
C​
1​
biglongthing
2​
9999​
9999​
B2: =IFERROR(1 / (1 / (A2 - 10000)) + 10000, "")
3​
10000​
4​
10001​
10001​
5​
548277​
548277​
 
Upvote 0
My "big-long-thing" is the max of a bunch of numbers with lots of decimal. I put that max equation in where you have your A2. Then I subtract the original max with what your logic returns, and get a small difference... -5.06645E-10
 
Upvote 0
Always better to ask the question you want answered ....
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,718
Members
448,986
Latest member
andreguerra

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