What's new
USCHO Fan Forum

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • The USCHO Fan Forum has migrated to a new plaform, xenForo. Most of the function of the forum should work in familiar ways. Please note that you can switch between light and dark modes by clicking on the gear icon in the upper right of the main menu bar. We are hoping that this new platform will prove to be faster and more reliable. Please feel free to explore its features.

Excel formula question

Slap Shot

I got nothing
I need a "double if then" formula please.

For instance I know that: =IF(F4>D4,"Y","N") works by itself, but what if I don't want to return a Y or an N without the formula also asking?: =IF(G4>E4,"Y","N")

Based upon the following values the formula in K should result in:

D E F G K
1 1 2 2 Y
2 2 1 1 N
1 2 2 1 N

Thanks.
 
Re: Excel formula question

I need a "double if then" formula please.

For instance I know that: =IF(F4>D4,"Y","N") works by itself, but what if I don't want to return a Y or an N without the formula also asking?: =IF(G4>E4,"Y","N")

Based upon the following values the formula in K should result in:

D E F G K
1 1 2 2 Y
2 2 1 1 N
1 2 2 1 N

Thanks.

Perhaps:

=IF(AND(F4>D4,G4>E4),"Y","N")

Returns Y only if F4>D4 and G4>E4, otherwise returns N.
 
Re: Excel formula question

You can nest IF statements as far as you want to. Although i'm sure there is a limit to the number of characters Excel will allow in a formula.

Just keep putting the next IF in the "then" section of your last IF statement and then close them all with ) at the very end.

example:
=IF(something, this, IF(something, this, IF(something, this, then)))

Or you can also put the then before the last ).

You can also nest them in the "this" section if you need too. Very flexible.
 
Last edited:
Back
Top