Computing.Net > Forums > Office Software > Excel nested IF statements

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Excel nested IF statements

Reply to Message Icon

Name: davidrhowells
Date: August 10, 2005 at 06:12:11 Pacific
OS: Windows2000
CPU/Ram: P42200/1024mb
Comment:

=IF(AND(A3-TODAY()<30,F3=""),"Request ET","Ok")

=IF(AND(F3<>"", TODAY()>=F3+30), "Re-Request ET", "Ok")

=IF(AND(A3-TODAY()<7,AND(J3<>"", H4="")), "Chase", "Ok")

The above are 3 seperate IF statements. I would like to nest them into one statment so either "Request", "Re-request", "Chase" or "Ok" is the outcome, depending on the data. I have attempted this with no joy. Any advice please?



Sponsored Link
Ads by Google

Response Number 1
Name: rhawk7938
Date: August 10, 2005 at 11:06:06 Pacific
Reply:

First thought is that you might be better using select case, rather than nested for-next statements.

Syntax=

Select Case testexpression
[Case expressionlist-n
[statements-n]] ...
[Case Else
[elsestatements]]
End Select


Example:

Dim Number
Number = 8 ' Initialize variable.
Select Case Number ' Evaluate Number.
Case 1 To 5 ' Number between 1 and 5, inclusive.
Debug.Print "Between 1 and 5"
' The following is the only Case clause that evaluates to True.
Case 6, 7, 8 ' Number between 6 and 8.
Debug.Print "Between 6 and 8"
Case 9 To 10 ' Number is 9 or 10.
Debug.Print "Greater than 8"
Case Else ' Other values.
Debug.Print "Not between 1 and 10"
End Select



0

Response Number 2
Name: Michael J (by mjdamato)
Date: August 12, 2005 at 13:50:48 Pacific
Reply:

=IF(AND(A3-TODAY()<30,F3=""),"Request ET",IF(AND(F3<>"", TODAY()>=F3+30), "Re-Request ET", IF(AND(A3-TODAY()<7,AND(J3<>"", H4="")), "Chase", "Ok")))

Michael J


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Excel nested IF statements

Excel- Nested IF/AND Function www.computing.net/answers/office/excel-nested-ifand-function/7973.html

Nested IF statements www.computing.net/answers/office/nested-if-statements/8337.html

Excel Nested If Statement www.computing.net/answers/office/excel-nested-if-statement/9006.html