Excel IF Function

M

macropod

Hi Kitt,

Anywhere or nowhere - it depends on what, if anything, the IF test is for.
Perhaps you could be more specific?

Cheers
 
K

Kitt

macropod said:
Hi Kitt,

Anywhere or nowhere - it depends on what, if anything, the IF test is for.
Perhaps you could be more specific?

Cheers





Sorry, Im very new to this. I am working on a tutorial for a loan calculator. The final total is "Payment per period" and I have been asked for the total to show $0 when the cells are empty instead of error #DIV/0!
The cells are as follows : B3 Annual Interest Rate, B4 Term Of Loan (Years),
B5 Payments per year, B6 Principal, B8 Payment Per Period (Total)
Thanks a million for your prompt reply. Kitt
 
D

Don Guillett

maybe you mean? Look in the help index for ISERR
=if(iserr(yourformula),"",yourformula)
 
M

macropod

Hi Kitt,

In that case, try:
=IF(OR(B5=0,B6=0),0,PMT(B3/B5,B4*B5,B6))
since only B5 and B6 being 0 are likely to cause a #DIV/0! result or, for a
more generalised solution:
=IF(ISERROR(PMT(B3/B5,B4*B5,B6)),0,PMT(B3/B5,B4*B5,B6))

Cheers


calculator. The final total is "Payment per period" and I have been asked
for the total to show $0 when the cells are empty instead of error #DIV/0!
 
K

Kitt

Hi Macropod,
Ok, I was missing the OR function, but it still doesnt' show the total as
$0.00.
I am so grateful for your help, I have been tearing my hair out over this
since last Tuesday!
Kitt
 
K

Kitt

I GOT IT!!!
In the Fun Arguments the amount in value_if_true was entered as 0 instead of
$0.00.
Thank you, thank you, thank you for all your help.
Cheers!
Kitt
 
M

macropod

Hi daddylonglegs,

Not if B4 is zero. The correct rendition should have been:
=IF(OR(B5=0,B4=0),0,PMT(B3/B5,B4*B5,B6))

An alternative rendition would be:
=IF(B5*B4=0,0,PMT(B3/B5,B4*B5,B6))

Cheers

"daddylonglegs" <[email protected]>
wrote in message
news:[email protected]...
 
D

daddylonglegs

macropod said:
Hi daddylonglegs,

Not if B4 is zero. The correct rendition should have been:
=IF(OR(B5=0,B4=0),0,PMT(B3/B5,B4*B5,B6))

An alternative rendition would be:
=IF(B5*B4=0,0,PMT(B3/B5,B4*B5,B6))

Cheers

Indeed macropod, you are correct, although, based on my original
formula, you can use

=IF(B5*B4,PMT(B3/B5,B4*B5,B6),0)
 
Top