Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
=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?

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

=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

![]() |
![]() |
![]() |

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