# If statment for three results....

1. ## If statment for three results....

Hello friends...

I am trying to write "IF" statement.... as per following logic....

1. Column A - Date of Expiry
2. Column B - NOC issued
3. Column C - Status as today (Status options, "Expired", "NOC" given and "Valid")

Condition 1: If Date is < than Date(today) then in Column C "Expired"
Condition 2: If in Column B "NOC" than in Column C "NOC" ( P.S. irrespective of Date of expiry)
Condition 3: If Date > than Date (today) then in Column C "Valid"
Condition 4: If Date > than Date (today) and in Column B "NOC" then in Column C "NOC"

=IF(1A<TODAY(),"Expired",IF(B1="NOC","NOC",IF(A1<TODAY(),"Expired","Valid")))

in above statement only two conditions are working...

2. ## Re: If statment for three results....

``Please Login or Register  to view this content.``
Is this okie?

If B1=NOC, regardless what date in A1. If there is not NOC, check date. If date < today then "Expired", else if date >= today, then "Valid"

3. ## Re: If statment for three results....

Not 100% clear but I'd guess you want either:
=IF(B1="NOC","NOC",IF(A1<Today(),"Expired","Valid"))
or
=if(B1="NOC","NOC ","")&IF(A1<Today(),"Expired","Valid")

4. ## Re: If statment for three results....

Originally Posted by wenqq3
``Please Login or Register  to view this content.``
Is this okie?

If B1=NOC, regardless what date in A1. If there is not NOC, check date. If date < today then "Expired", else if date >= today, then "Valid"
Dear wenqq3,

Thank you for the reply...your code working...but it has one problem....i would like to mention that yudlugar (valued Forum contributor) solved the thread....thank for your efforts...

5. ## Re: If statment for three results....

Originally Posted by yudlugar
Not 100% clear but I'd guess you want either:
=IF(B1="NOC","NOC",IF(A1<Today(),"Expired","Valid"))
or
=if(B1="NOC","NOC ","")&IF(A1<Today(),"Expired","Valid")
Dear Yudlugar

Great...first code working nicely with all conditions.... thanks a lot..

There are currently 1 users browsing this thread. (0 members and 1 guests)