You are here:

# Excel/simple date formula

Question
if i enter this formula in cell k2 i get error!
= if( h2< 15/11/2015, e2*0.175,0)
column h contains dates in format dd mm yyyy and column e contains numbers. if i enter 15/11/2015 in cell p2 and use this formula i get it right.
=if( h2< p2,e2*0.175,0). WHY the error.

Thanks
pat, from India

Hi Patrick,
Date formats are just for display in excel, in the background, excel treats even dates as numbers.
When you enter the formula as =if(h2<15/11/2015,e2*.175,0), excel is taking the "15/11/2015" part and calculating as 15 / 11 / 2015 = 0.000677. In your example, if you enter any value in column H which is less than 0.000677, then you'll see that excel calculates the result.

If you want to use a check on date, you have two options:
1. Use the approach you mentioned in the question, ie, store the date in P2 and link the formula to P2.
2. Use the numerical equivalent of 15/11/2015 which is 42323. In that case, your formula will be =if(h2<42323,e2*.175,0)

Hope this helps.

Gulshan.
Questioner's Rating
 Rating(1-10) Knowledgeability = 9 Clarity of Response = 9 Politeness = 10 Comment Thank u very much.

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

#### GULSHAN PURSWANI

##### Expertise

I can answer questions related to the following topics: 1. MS Excel - Creating and Linking Formulae, Running Pivot Tables, Vlookup etc. 2. Macros / VBA - Creating Macros to do specific jobs. Importing / Exporting / Validating Data in excel through Macros.

##### Experience

I've been working on excel for over 10 years and on VBA macros for over 3 years now.

Education/Credentials
Bachelor of Commerce, Chartered Accountant from The Institute of Chartered Accountants of India