Hi everyone,
in A1 I would like to generate a fixed date based on what is happening in
B1, C1 and D1
B1= today() C1= B1-A1 D1 is most of the time quot;emptyquot;
When D1 is empty, A1 should be empty but when an X is inserted in D1 a fixed
date should be generated in A1, therefore the result of A1 is used in C1.
Hope this is clear.
TIA
Gilles
If you have your fixed date in a cell, e.g. Z1 use this formula in A1
=IF(D1=quot;xquot;,Z1,quot;quot;)
otherwise you can reference the date directly in the formula, e.g.
=IF(D1=quot;xquot;,DATE(2005,12,31),quot;quot;)
format cell as a date
in C1 formula should be
=IF(A1lt;gt;quot;quot;,B1-A1,quot;quot;)
format as general--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
View this thread: www.excelforum.com/showthread...hreadid=508778Thank you it works like a charm.
Gilles
quot;daddylonglegsquot; gt;
wrote in message
news:daddylonglegs.22rwny_1139171400.8195@excelfor um-nospam.com...
gt;
gt; If you have your fixed date in a cell, e.g. Z1 use this formula in A1
gt;
gt; =IF(D1=quot;xquot;,Z1,quot;quot;)
gt;
gt; otherwise you can reference the date directly in the formula, e.g.
gt;
gt; =IF(D1=quot;xquot;,DATE(2005,12,31),quot;quot;)
gt;
gt; format cell as a date
gt;
gt; in C1 formula should be
gt;
gt; =IF(A1lt;gt;quot;quot;,B1-A1,quot;quot;)
gt;
gt; format as general
gt;
gt;
gt; --
gt; daddylonglegs
gt; ------------------------------------------------------------------------
gt; daddylonglegs's Profile:
gt; www.excelforum.com/member.php...oamp;userid=30486
gt; View this thread: www.excelforum.com/showthread...hreadid=508778
gt;
- Jun 22 Fri 2007 20:38
Genarate a fixed date with an IF function?
close
全站熱搜
留言列表
發表留言