This is a formula I have in my Excel spreadsheet that is not working correctly.
=IF(AND(quot;12/1/05quot;lt;L2,L2lt;=quot;2/28/06quot;),J2,0)
This formula works correctly with numbers, but not with dates. I have the
L2 cell format as a date. This formula will return 0 when the date in L2 is
12/20/05 for example.
If someone could help me with this formula I would really appreciate it.
Thanks,
First, the display formatting of L2 has nothing to do with the value
stored in it, so changing its number format won't affect the formula
(other than using Text).
one way:
=IF(AND(L2gt;DATE(2005,12,1), L2lt;=DATE(2006,2,28)),J2,0)In article gt;,
quot;TJACquot; gt; wrote:
gt; This is a formula I have in my Excel spreadsheet that is not working
gt; correctly.
gt;
gt; =IF(AND(quot;12/1/05quot;lt;L2,L2lt;=quot;2/28/06quot;),J2,0)
gt;
gt; This formula works correctly with numbers, but not with dates. I have the
gt; L2 cell format as a date. This formula will return 0 when the date in L2 is
gt; 12/20/05 for example.
gt;
gt; If someone could help me with this formula I would really appreciate it.
I would recommend you use the values in Helper Cells instead of hard coding
your dates into the formula...........this would make for easier changing
them later.
=IF(AND(L1lt;L2,L2lt;=L3),J2,0)
Vaya con Dios,
Chuck, CABGx3
quot;TJACquot; wrote:
gt; This is a formula I have in my Excel spreadsheet that is not working correctly.
gt;
gt; =IF(AND(quot;12/1/05quot;lt;L2,L2lt;=quot;2/28/06quot;),J2,0)
gt;
gt; This formula works correctly with numbers, but not with dates. I have the
gt; L2 cell format as a date. This formula will return 0 when the date in L2 is
gt; 12/20/05 for example.
gt;
gt; If someone could help me with this formula I would really appreciate it.
gt;
gt; Thanks,
- Mar 13 Thu 2008 20:43
IF statement not working
close
全站熱搜
留言列表
發表留言