If Formula involving date -not right

M

Marilyn

Hello my formula does not work - it does not give me an error message but
the answer is wrong
THis is what I have
Cell a2=date, cell F2=total sales
in cell G2 I have the following formula
=IF(A2>1/1/2009,F2*15%,IF(A2<1/1/9,F2*17.5%,FALSE))

in PLain english
if the date in cell A2 is greater than or equal to 1/1/2009 then multiple f2
by 15%, if the date in cell A2 is less than 1/1/09 multiply by 17.5% thanks
in advance
 
M

Max

This is probably what you're after:
=IF(A2="","",IF(A2>= --"1 Jan 2009",F2*15%,F2*17.5%))
Test it out, satisfy yourself that its ok*

p/s: Make it unambiguous when it comes to using dates

*then do a high five here, click the YES button below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,000 Files:370 Subscribers:66
xdemechanik
 
F

Fred Smith

To Excel, 1/1/2009 is 1 divided by 1 divided by 2009. You need to tell it
you have a date. Bob's formula does this for you, but it is missing a comma.
Try:

=IF(A2>DATE(2009,1,1),F2*15%,F2*17.5%)
 
G

Gord Dibben

This seems to work properly.

=IF(A2>DATEVALUE("1/1/2009"),F2*15%,IF(A2<DATEVALUE("1/1/9"),F2*17.5%,FALSE))


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top