IF statment with """ markings

bobo17

New Member
Joined
Jun 14, 2011
Messages
11
Hi
I am just getting into understanding formulas etc. I have a Dividend Reinvestment spreadsheet (tracks dividend paying stocks performance etc.) and there are some complicated formulas embedded in it. I am trying to understand them.
Here is one that I need help with, specifically what the character "" would mean in relation to this formula?:

=IF(FALSE,0,IF(AND(OR(B22="",C22=""),D22=""),"",IF(P22<>"",P22,B22*C22)+D22))


thanks in advance any suggestions are appreciated
bobo
 
hi.
Can someone be so kind as to state what the formula is saying in english, so I can follow the equation? I think i am mostly there but not sure what the comma between P22, B22 is saying? Rather than bouncing questions back and forth, maybe an english interpretation will suffice.

=IF(FALSE,0,IF(AND(OR(B22="",C22=""),D22=""),"",IF(P22<>"",P22,B22*C22)+D22))
The comma between the P22 and B22 separates the TRUE and FALSE functions of that "IF" statement.

Basically, this is what the formula says:

IF(Cell Value is FALSE, then then return a 0, IF(cell value is NOT FALSE then check to see if cell B22 OR C22 are blank AND also check if D22 is blank), if both D22 AND either B22 or C22 are blank, then return a BLANK value to this cell (""), if any part of the previous statement is NOT true then check IF(P22 is not blank, if it's TRUE that P22 is not blank then display the value of P22+D22, otherwise if P22 IS blank then multiply the value of B22 and C22 and add the product to the value of D22 ((B22*C22)+D22).
 
Last edited:
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
That is not quite correct:


IF(Cell Value is FALSE,

There is no reference to a cell, it says if FALSE, the TRUE condition would never be executed.

For example:

=IF(FALSE,1,2)

The Condition part evalutes to FALSE, so it will always execute the FALSE condition.
 
Upvote 0
That is not quite correct:


IF(Cell Value is FALSE,

There is no reference to a cell, it says if FALSE, the TRUE condition would never be executed.

For example:

=IF(FALSE,1,2)

The Condition part evalutes to FALSE, so it will always execute the FALSE condition.

So, if i understand correctly, this part is useless and the formula can be shortened to

=IF(AND(OR(B22="",C22=""),D22=""),"",IF(P22<>"",P22,B22*C22)+D22))

Am i right?

M.
 
Upvote 0
So, if i understand correctly, this part is useless and the formula can be shortened to

=IF(AND(OR(B22="",C22=""),D22=""),"",IF(P22<>"",P22,B22*C22)+D22))

Am i right?

M.
You are correct.

On a side note...

That's a really unusual formula. The first part is not needed:

=IF(FALSE,0

=IF(AND(OR(B22="",C22=""),D22=""),"",IF(P22<>"",P22,B22*C22)+D22)
 
Upvote 0
Thanks again.
Its hard for a newbie to decipher these embedded conditions, but with your help and reviewing, i am sure it will become clearer.

again, this is a spreadsheet that someone made to track stock & dividend performance, so I guess the formulas used could be truncated, but it could be that the original make of the the spreadsheet used the formula construction that he was familiar with.

bobo

bobo
 
Upvote 0

Forum statistics

Threads
1,224,612
Messages
6,179,890
Members
452,948
Latest member
Dupuhini

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