# IF AND Formula with a Date and Percent

#### MLSNetworks

##### New Member
I am trying to create an IF AND formula that looks at a cell with a Date to see if it is 30 days from Today and then looks at another cell with a ranking percent and return true/false text.

Below is my formula which is not working.

=IF(AND(D2=TODAY()+30,G2<0.8),"OK","REVIEW")

What is a better formula? Thanks for any help you can provide!

#### Joe4

What is a better formula? Thanks for any help you can provide!
There is nothing inherently wrong with using that formula. That is probably the way I would do it too.
The only thing I can see is you are only checking to see if it is EXACTLY 30 days from today (not sure if you really want a "greater than or equal to" operand here instead).

#### MLSNetworks

##### New Member
Thanks for your reply, Joe4. Actually, I want to see if the Date is "within" 30 days of Today. I should've said that first. So yes, that is what I exactly want to see. The reason behind it is this: The Date represents when the sales persons deal is expected to close (aka book) and the ranking % is the confidence level that the deal will close. So if the Date is within 30 days of Today and the confidence ranking % is less than 80% then the sales person is not doing a very good job at forecasting their deals in the CRM tool. If the deal is expected to close within 30 days then the sales persons confidence level should be 80% or greater. I am trying to get sales people to forecast their deals better.

#### Joe4

OK, try this:
Code:
``[COLOR=#333333][FONT=Verdana]=IF(AND(D2-TODAY()<=30,G2<0.8),"REVIEW","OK")[/FONT][/COLOR]``
(assuming that the date in D2 is in the future, and not in the past).

I think you also got what you want to return reversed. You want it reviewed if it is within 30 days AND less than 80%, right? If so, the "REVIEW" argument should come before the "OK" one in the formula.