IF function within an IF function?

  • Thread starter Thread starter picktr
  • Start date Start date
P

picktr

How can I nest an IF function within an IF function?

What I have now:

=IF(G5<G6,"A","B")

What I would like:

IF G5 <= G6
THEN IF J5 < J6, "A", "B"
ELSE "B"

If the the first 2 comparisons are equal, I want it to
evaluate different cell
 
=IF (G5 <= G6,IF(J5 < J6, "A", "B" ),"B") should do it for
you.

Hope this helps

Paul Falla
 
Hi,

Try:
=IF(G5<=G6,IF(J5<J6,"A","B"),"B")
or, better still:
=IF(AND(G5<=G6,J5<J6),"A","B")

Cheers
 
H,I are hidden

E F G J

5 Jeff B 10 10
6 Steve B 10 9


Both formulas are returning B

The result should be Jeff B
Steve
 
That's not what you asked for, the conditions you stated with

G5<G6 i.e. 10 is not less than 10 so that is FALSE
J5<J6 i.e. 10 is not less than 9 so that is also FALSE
 
Peo,

Than how do I correct it?
( F ) ( G )
( J )
row5 Jeff ( B ) (10) (10)
row6 Steve ( A ) (10) (10)

I want the first evaluation to be from the first column of numbers
in column G

If both are = than it should look at the second column of numbers
in column J, then perform the function

If it were just the first column of numbers, that is easy
 

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

Similar Threads

problem with formulas (2) 7
Is there an Excel Function that can be used in lieu of this formul 5
Nested IF function 4
Tighter formula than this? 5
An easier way? 9
IF Statements 1
Help !!! 2
function" if" 5

Back
Top