How do I use an quot;IFquot; function involving dates. For Example: (IF (a date in
one cell ends in 2005 THEN quot;xquot;),IF( a date in one cell ends in 2006 THEN
quot;Yquot;), quot; quot;)
Assuming these cells are really dates and by 'ends in' you mean 'is in the
year', then you would do something like
=if(year(a1)=2005,true_value,false_value). If they're really strings that
end in 2005, then =if(right(a1,4)=quot;2005quot;,true_value,false_value)
quot;Mikequot; wrote:
gt; How do I use an quot;IFquot; function involving dates. For Example: (IF (a date in
gt; one cell ends in 2005 THEN quot;xquot;),IF( a date in one cell ends in 2006 THEN
gt; quot;Yquot;), quot; quot;)
Thank You so much I have been trying to figure out that formula on and off
for weeks. Do You work for Microsoft or do you just provide free advice
to people?
quot;bpeltzerquot; wrote:
gt; Assuming these cells are really dates and by 'ends in' you mean 'is in the
gt; year', then you would do something like
gt; =if(year(a1)=2005,true_value,false_value). If they're really strings that
gt; end in 2005, then =if(right(a1,4)=quot;2005quot;,true_value,false_value)
gt;
gt; quot;Mikequot; wrote:
gt;
gt; gt; How do I use an quot;IFquot; function involving dates. For Example: (IF (a date in
gt; gt; one cell ends in 2005 THEN quot;xquot;),IF( a date in one cell ends in 2006 THEN
gt; gt; quot;Yquot;), quot; quot;)
Just an Excel geek sharing some and learning some via the communities...
quot;Mikequot; wrote:
gt; Thank You so much I have been trying to figure out that formula on and off
gt; for weeks. Do You work for Microsoft or do you just provide free advice
gt; to people?
gt;
gt; quot;bpeltzerquot; wrote:
gt;
gt; gt; Assuming these cells are really dates and by 'ends in' you mean 'is in the
gt; gt; year', then you would do something like
gt; gt; =if(year(a1)=2005,true_value,false_value). If they're really strings that
gt; gt; end in 2005, then =if(right(a1,4)=quot;2005quot;,true_value,false_value)
gt; gt;
gt; gt; quot;Mikequot; wrote:
gt; gt;
gt; gt; gt; How do I use an quot;IFquot; function involving dates. For Example: (IF (a date in
gt; gt; gt; one cell ends in 2005 THEN quot;xquot;),IF( a date in one cell ends in 2006 THEN
gt; gt; gt; quot;Yquot;), quot; quot;)
If you have the time I have a a really complicated and Puzzling Excell
question that also involves the quot;IFquot; formula between two worksheets. Do you
have an e-mail you would be willing to communicate over or do you perfer the
Microsoft quot;Chat roomquot;?
quot;bpeltzerquot; wrote:
gt; Just an Excel geek sharing some and learning some via the communities...
gt;
gt; quot;Mikequot; wrote:
gt;
gt; gt; Thank You so much I have been trying to figure out that formula on and off
gt; gt; for weeks. Do You work for Microsoft or do you just provide free advice
gt; gt; to people?
gt; gt;
gt; gt; quot;bpeltzerquot; wrote:
gt; gt;
gt; gt; gt; Assuming these cells are really dates and by 'ends in' you mean 'is in the
gt; gt; gt; year', then you would do something like
gt; gt; gt; =if(year(a1)=2005,true_value,false_value). If they're really strings that
gt; gt; gt; end in 2005, then =if(right(a1,4)=quot;2005quot;,true_value,false_value)
gt; gt; gt;
gt; gt; gt; quot;Mikequot; wrote:
gt; gt; gt;
gt; gt; gt; gt; How do I use an quot;IFquot; function involving dates. For Example: (IF (a date in
gt; gt; gt; gt; one cell ends in 2005 THEN quot;xquot;),IF( a date in one cell ends in 2006 THEN
gt; gt; gt; gt; quot;Yquot;), quot; quot;)
Maybe you can help. Saw this and this is my question.
I have a date say 1/1/2005 in say cell J7; I want to write an if formula
that says if J7 is less than 7/1/2006 then it returns quot;expiredquot; and if not it
returns quot;currentquot;
Thanks
quot;bpeltzerquot; wrote:
gt; Assuming these cells are really dates and by 'ends in' you mean 'is in the
gt; year', then you would do something like
gt; =if(year(a1)=2005,true_value,false_value). If they're really strings that
gt; end in 2005, then =if(right(a1,4)=quot;2005quot;,true_value,false_value)
gt;
gt; quot;Mikequot; wrote:
gt;
gt; gt; How do I use an quot;IFquot; function involving dates. For Example: (IF (a date in
gt; gt; one cell ends in 2005 THEN quot;xquot;),IF( a date in one cell ends in 2006 THEN
gt; gt; quot;Yquot;), quot; quot;)
Try this
=IF(J7=quot;quot;,quot;quot;,IF(J7lt;quot;7/1/2006quot; 0,quot;expiredquot;,quot;currentquot;))--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
View this thread: www.excelforum.com/showthread...hreadid=498736That works! Thanks so much but could you tell me why you couldn't simply say
=if (J7 lt; 7/1/2006, quot;expiredquot;, quot;currentquot;)
quot;daddylonglegsquot; wrote:
gt;
gt; Try this
gt;
gt; =IF(J7=quot;quot;,quot;quot;,IF(J7lt;quot;7/1/2006quot; 0,quot;expiredquot;,quot;currentquot;))
gt;
gt;
gt; --
gt; daddylonglegs
gt; ------------------------------------------------------------------------
gt; daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
gt; View this thread: www.excelforum.com/showthread...hreadid=498736
gt;
gt;
7/1/2006 = 7 divided by 1 divided by 2006 (=0.00349). It's not a date.
By using date(2006,7,1) or having excel coerce the text quot;7/1/2006quot; (with 0) to
a date, the formula could evaluate the way you want.
Woodloch wrote:
gt;
gt; That works! Thanks so much but could you tell me why you couldn't simply say
gt; =if (J7 lt; 7/1/2006, quot;expiredquot;, quot;currentquot;)
gt;
gt; quot;daddylonglegsquot; wrote:
gt;
gt; gt;
gt; gt; Try this
gt; gt;
gt; gt; =IF(J7=quot;quot;,quot;quot;,IF(J7lt;quot;7/1/2006quot; 0,quot;expiredquot;,quot;currentquot;))
gt; gt;
gt; gt;
gt; gt; --
gt; gt; daddylonglegs
gt; gt; ------------------------------------------------------------------------
gt; gt; daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
gt; gt; View this thread: www.excelforum.com/showthread...hreadid=498736
gt; gt;
gt; gt;
--
Dave Peterson
- Oct 05 Fri 2007 20:40
How do I use an quot;IFquot; formula using dates in excell?
close
全站熱搜
留言列表
發表留言