Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nested if

Status
Not open for further replies.

law41

Technical User
Joined
Apr 6, 2003
Messages
1
Location
US
I need to put in a cell (i23) an error message that states "This combination of loan type and length is not available. Please make changes to I20 and/or i21 to try again." To do so, I need a nested if statement to test to see if length is greater than or oequal to 72 and "automobile". If so, then error message. Ortherwise test to see if length is less than 120 and "home". If so then the same error message. Otherwise no error message.

I got the part to test for home -- =IF(I20=&quot;h&quot;,IF(I22<120,&quot;This combination of loan type and length is not available. Please make changes to 120 and/or I21 to try again&quot;,&quot;&quot;))

How can I also include to test for auto. If auto and greater or equal to 72 get the above error message/
 
use the &quot;keyword search&quot; tab at the top of your post and search for IIF(. I believe this has been brought up before.

--MiggyD
 
=IF(OR(AND(I20=&quot;h&quot;,I22<120),AND(I20=&quot;automobile&quot;,I22>72)),&quot;Error Messgae&quot;,&quot;&quot;)

should do the trick
MiggyD - IIF is not available in excel Rgds
Geoff
&quot;Some cause happiness wherever they go; others whenever they go.&quot;
-Oscar Wilde
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top