Please expliain this formula for me..thanks alot!

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Some days back i ask a question on percentage increase & decrease trend calculations....and i think i got something i needed...
however i need to know how it works: link is below.

formula;
=IF(B1="","",(B2-B1)/B1)

Please tell me why we put =if(b1="",""? instead of directly inputing
=(B2-B1)/B1)???
http://www.mrexcel.com/forum/showthread.php?t=478659

Thanks in advance. Please help...
;)
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
IF B1 is blank the result is blank, ie you cant perform a calculation on two numbers if one of the numbers does not exist.

In this case B1 would be zero
anything divided by zero is infitnity and would produce a #DIV/0 error
 
Upvote 0
it returns a null string rather than an error, which you will get for values of "" in B1. It still doesn't pick up div/0 errors for values of zero in B1, so this should also be included

maybe
Code:
=IF(OR(B1="",B1=0),"",(B2-B1)/B1)
to prevent this error
 
Upvote 0

Forum statistics

Threads
1,215,022
Messages
6,122,721
Members
449,093
Latest member
Mnur

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