Excel forumula

Kapil Prasad 140 Reputation points
2023-12-31T14:41:03.5366667+00:00

Conditions 1-3 are variables that can change with the increase of subsequent data. If the following conditions are met, they hold true:

Condition 1, N2>=1

Condition 2, M2<1

Condition 3, if any day in L2: B2>=1 and AG2<1

After all three conditions are met, it shows that it was completed yesterday

Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Microsoft 365 and Office | Excel | For business | Windows

Answer accepted by question author
Barry Schwarz 6,111 Reputation points
2023-12-31T20:44:32.1633333+00:00

What is your question? Explain what the expression "if any day in L2" means.

IF(AND(N2>=1,M2<1,B2>=1,AG2<1),TODAY()-1,"NOT COMPLETE") but be aware that if you run this today and the conditions are met the result will be 30Dec23 and if you run it tomorrow the result will be 31Dec23.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Newest
  1. Aditya Tomar 5 Reputation points
    2026-07-21T10:22:04.8133333+00:00

    The easiest way to handle this is by using the AND function for the first two conditions and COUNTIFS to check whether there is any day that meets the required criteria. For example:

    =IF(AND(N2>=1,M2<1,COUNTIFS(L2:L2,">=1",AG2:AG2,"<1")>0),"Completed Yesterday","")

    The AND function ensures that Conditions 1 and 2 are both met, while COUNTIFS checks whether the required condition is satisfied. If all three conditions are true, the formula returns "Completed Yesterday"; otherwise, it returns a blank.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.