New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

build a Formula in excel

Formulas, Functions, Formatting, Charts, Data Analysis, etc.

build a Formula in excel

Postby harry » Sat Feb 27, 2016 5:44 am

Hi All,

I am trying to populate the status of a contract . based on its expiry date.

For example :- in cell N with the heading Contract Expiry Date , now i would like to build a formula which can provide me the following result

It should alert me 30 days in advance from the date of expiration of contract with a text saying"renew the contract"
It should alert me 60 days in advance from the date of expiration of contract with text saying "expiring soon"
It should tell me if the contract is under contract of expired
It should return the blank cell as blank

Thank you for your help
  • 0

harry
Rookie
 
Posts: 2
Joined: Feb 27, 2016
Reputation: 0
Excel Version: 2013

Re: build a Formula in excel

Postby harry » Sat Feb 27, 2016 8:33 am

I have put this formula =IF(N12="","",IF(N12>TODAY()," In-Contract",IF(N12<=TODAY()+60,"Expiring Soon",IF(N12<=TODAY()+30,"Renew","Expired"))))

however its not giving accurate answer
Can some one check and assist me what did i do wrong

Plz help me at the earlist
Please help me i am waiting to hear from you
  • 0

Last edited by pecoflyer on Mon Feb 29, 2016 2:34 pm, edited 1 time in total.
Reason: Removed unnecessary quote
harry
Rookie
 
Posts: 2
Joined: Feb 27, 2016
Reputation: 0
Excel Version: 2013

Re: build a Formula in excel

Postby ManxXL » Mon Feb 29, 2016 8:00 am

Hi Harry,

It looks like the order of your IF statement is the problem, with the order you currently have, the statement will end as long as the date is greater than todays date, so the formula will not check for today + 30 or today + 60 The below should give you what you want.

Code: Select all
=IF(N12="","",IF(N12<TODAY()," Expired",IF(N12<=TODAY()+30,"Renew",IF(N12<=TODAY()+60,"Expiring Soon","In Contract"))))
  • 0

ManxXL
Regular
 
Posts: 47
Joined: May 16, 2013
Reputation: 12
Excel Version: 2010


Return to General Excel Questions

Who is online

Users browsing this forum: No registered users and 142 guests