View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default Help with if formula please.

On Feb 26, 7:06*pm, Lynz wrote:
I am trying to write a formula but am getting a bit lost.
I want a formula in a7 that will return 1 if e7 is 0.1 and
c13 is between 1 and 21. *If c13 is blank and e7 is 0.1 I
want a7 to be 7


What if neither of those conditions are true? Perhaps the following
formula in A7:

=IF(AND(E7=0.1,1<=C13,C13<=21),1,IF(AND(E7=0.1,C13 =""),7,""))

That returns the null string (appears blank) if neither condition is
true.

However, if E7 contains a formula instead of a constant and you do not
explicitly round its result appropriately, what __appears__ to be 0.1
in E7.

In that case, the best solution is to explicitly round the result of
E7 in the formula in E7 itself. Alternatively:

=IF(ROUND(E7,1)=0.1,IF(C13="",7,IF(AND(1<=C13,C13< =21),1,""),"")

Note: The same might be true of C13. What are the contents of C13
and E7: constants or formulas? If the latter, what are the formulas?