You are here:

Excel/Formatting Dates in a Formula

Advertisement


Question
=if(today()+45>A1,"Warning: Payment is coming due","")
In your example above, how should A1, which is the original term date, be formatted in order for the warning to work?  Currently, I have it as mm/dd/yyyy and all my contracts appear to be coming done within the next 45 days.  I tried changing from 45 to 30 and it still reads the same.  I'm thinking the term date needs to be formatted as general, text, etc.  Please advise

Answer
In order for the formula to work, it has to be in a Date format.  You can check if it is a date format by changing the format to number: it should show a 5 digit number.  If it doesn't, make sure that you select a date format and enter the date again; the condition will not work if the date is recognized as text.

Hope this helps,
Miguel
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

All Answers

Answers by Expert:


Ask Experts

Volunteer


Miguel Zapico

Expertise

I will try to answer any question that I can replicate in my current environment (I use Excel 2003 with Windows XP). This may include formula related questions on other Excel versions. Due to time limitations, I am not writing custom code to answer questions any more. Sorry for the inconvenience.

Experience

I have worked with Excel for the past 12 years, in various environments.

Organizations
NYPC (New York PC users group)

Organizations
NYPC (New York PC users group)

Education/Credentials
MCSE in Windows NT

©2009 About.com, a part of The New York Times Company. All rights reserved.