if statements
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel Training and help » If statements

If statements

resolvedResolved · Low Priority · Version 2003

replyReply Thu 10 Feb 2011, 17:06Delegate Christina said...

Christina has attended:
Excel Advanced course
Excel VBA Intro Intermediate course

If statements

Please can you help me. I am trying to write a formula to say the below:

If cell Q2 is greater than 31/12/2010, then say "No 2010 loan", if not then ""

The formula I used is =IF(Q2>31/12/2010,"No 2010 loan","")

Q2 is a date and formatted as 01/08/2010

For some reason this is not bringing through the correct value, any suggestions??

Thank you

Christina

For upcoming training course dates see: Pricing & availability

replyReply Fri 11 Feb 2011, 10:30Trainer Anthony said...

RE: If statements

Hi Christina, thanks for your query. Try this:

=IF(A2>40543, "No 2010 loan", "")

Excel doesn't "see" dates, it only sees a numerical number. If you format 31/12/2010 as a number it's actually 40543, hence the formula above. You can keep Q2 formatted as a date for the users benefit, but your formula needs to test the numerical equivalent of the date, not the date formatted version.

Hope this helps,

Anthony

 

Please browse our web site to find out more about
excel computer training and other Microsoft training courses.

Excel tip:

Copying Values Without Formulas in Excel 2010

If you want to copy the contents of a cell but don't want to copy the formula with it then use the following simple method:

Press Ctrl+C to copy the values in the cell. On the Home tab, click Paste and then click Paste Values.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard