ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If Formula involving date -not right (https://www.excelbanter.com/excel-discussion-misc-queries/220443-if-formula-involving-date-not-right.html)

Marilyn

If Formula involving date -not right
 
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(A21/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


Bob Phillips[_3_]

If Formula involving date -not right
 
=IF(A2DATE(2009,1,1)F2*15%,F2*17.5%)


--
__________________________________
HTH

Bob

"Marilyn" wrote in message
...
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(A21/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




Max

If Formula involving date -not right
 
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
---
"Marilyn" wrote:
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(A21/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


Fred Smith[_4_]

If Formula involving date -not right
 
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(A2DATE(2009,1,1),F2*15%,F2*17.5%)

"Marilyn" wrote in message
...
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(A21/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



Gord Dibben

If Formula involving date -not right
 
This seems to work properly.

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


Gord Dibben MS Excel MVP

On Wed, 11 Feb 2009 15:06:00 -0800, Marilyn
wrote:

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(A21/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




All times are GMT +1. The time now is 05:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com