How can a logical test equal one cell?

Mtyler

Board Regular
Joined
Oct 13, 2006
Messages
62
I'm confused.

I'm reviewing someone else's work and they have used the following if formula

=+IF(D15,D15/E15-1,"")

Cell D15 does not contain anything other than a hard coded number.

Surely this if function is useless, even if D15 contains nothing?

Thanks

Matt
 
In the formula posted at the top of the thread, the logic is "If D15's got something in it, divide it by E15 and then take away 1". In that formula, E15 would be the one causing the DIV/0 error, so why test D15?

Who knows, the OP didn't write it. Maybe the person who wrote it has some other logic for why they would do that...Honestly, it doesn't make sense to devide if EITHER number = 0. But the Div/0 error is only caused by the # to the right.

I was just giving an example of Why =IF(A1,true,false) is usefull...
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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