formula question, IF/AND

J

Jacob

=IF(AND(D14>1,(L14="Correspondent")),((M51/D14)+D17),(((P29+M51)/D14)+D17))

This is the formula I'm currently using.

Here's my question: if nothing is filled in the precendent fields, the above
returns the DIV/0! error, of course. How can I avoid this?
Typically, I do the =IF(SOMETHING, IF YES, "") to get rid of the divide by
zero error. But in the above case, I need my result cell to show once
formula if yes, and another if no, and then if nothing at all, don't display
the DIV/0!. Does that make sense??

I hope so!
Thanks for your help,
Jacob
 
F

Frank Kabel

Hi
try (also removed some parentheses):
=IF(AND(D14>1,L14="Correspondent"),(M51/D14)+D17,IF(D14<>0,(P29+M51)/D1
4+D17,""))
 
J

Jacob

Thanks Frank, for the idea. Actually, the concept below is exactly what I'm
trying to do, but when I paste the formula into a cell, it comes back with a
formula contains an error. And I can't figure out where the error lies.

Can you help?

-Jacob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top