trying to shorten an if statement - must be some other function

pscseti

Board Regular
Joined
Nov 26, 2002
Messages
67
I'm using =if(d3*e3/f3+g3<>0,d3*e3/f3+g3,0)

Isn't there something similar to iferror(x,0) - that simply returns x as long as x is not an error.

A number of times - I need to test if something meets some condition and if it does I just want that value returned and if not I want a zero - but it involves say if the calc meets the condition that I have to again say provide me with the calc.

Tx
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
It looks like you are

Testing if calculation = 0
if it is 0 then return 0
else return the value

So why test at all?

=D3*E3/F3+G3

Will give you the same value if it is 0 it will return 0 anyway?
 
Upvote 0
Probably I didn't explain well.

So I posted it again slightly differently.

Basically I often calculate the results of large equations. If the equation meets some condition - than I return the result + some other number. If it doesn't meet the condition than I return some other value

So I need to distinguish if the equation meets a condition and if it does return that equation without having to have that equation be the true result in an if statement.

Tx
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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