View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Joe User[_2_] Joe User[_2_] is offline
external usenet poster
 
Posts: 905
Default IF formula not working

"MelissaS" wrote:
Can anyone tell me why this IF formula isn't working?
=IF(D5<E5<F5,"A",IF(D5E5F5,"B",
IF(D5<E5F5,"C",IF(D5E5<F5,"D","F"))))


=IF(AND(D5<E5,E5<F5),"A",
IF(AND(D5E5,E5F5),"B",
IF(AND(E5D5,E5F5),"C",
IF(AND(E5<D5,E5<F5),"D","F"))))

Note that that returns "F" when E5=D5 or E5=F5. So if D5<E5=F5, it returns
"F" instead of "A". Is that what you really want?

Also, when you write D5<E5F5, do you intend to imply D5F5? As I wrote it,
the formula returns "C" for both D5<F5<E5 and F5<D5<E5. Was that your intent?

A similar arises with D5E5<F5.

If you resolve these issues differently, it is very likely that your formula
can be simplified.


----- original message -----

"MelissaS" wrote:

Can anyone tell me why this IF formula isn't working?

=IF(D5<E5<F5,"A",IF(D5E5F5,"B",
IF(D5<E5F5,"C",IF(D5E5<F5,"D","F"))))

It's returning "B" every time. D5, E5, and F5 are all derived from
formulas. Is that the problem? I appreciate any help!