Hi,
I have been constructing a spreadsheet and have the following formula which
subtracts 6 months from the cell in A1 =DATE(YEAR(a1),MONTH(a1)-6,DAY(a1)) -
this formula works fine.
If there is no date in A1, quot;#VALUE!quot; is displayed. is there an addition part
to the above forumla that would leave the cell empty unless A1 has data in it?
thanks,
Bryan
=IF(A1=quot;quot;,quot;quot;,DATE(YEAR(a1),MONTH(a1)-6,DAY(a1)))
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
quot;Bryanquot; gt; wrote in message
...
gt; Hi,
gt;
gt; I have been constructing a spreadsheet and have the following formula
which
gt; subtracts 6 months from the cell in A1
=DATE(YEAR(a1),MONTH(a1)-6,DAY(a1)) -
gt; this formula works fine.
gt;
gt; If there is no date in A1, quot;#VALUE!quot; is displayed. is there an addition
part
gt; to the above forumla that would leave the cell empty unless A1 has data in
it?
gt;
gt; thanks,
gt; Bryan
Hi Bryan,
gt; =DATE(YEAR(a1),MONTH(a1)-6,DAY(a1)) -
gt; this formula works fine.
gt;
gt; If there is no date in A1, quot;#VALUE!quot; is displayed. is there an addition part
gt; to the above forumla that would leave the cell empty unless A1 has data in it?
gt;
Su
=IF(A1=quot;quot;,quot;quot;,DATE(YEAR(a1),MONTH(a1)-6,DAY(a1)))
Regards,
Jan Karel Pieterse
Excel MVP
www.jkp-ads.comBob/Jan Karel,
Thanks a lot - works perfectly!
Bryan
quot;Jan Karel Pietersequot; wrote:
gt; Hi Bryan,
gt;
gt; gt; =DATE(YEAR(a1),MONTH(a1)-6,DAY(a1)) -
gt; gt; this formula works fine.
gt; gt;
gt; gt; If there is no date in A1, quot;#VALUE!quot; is displayed. is there an addition part
gt; gt; to the above forumla that would leave the cell empty unless A1 has data in it?
gt; gt;
gt;
gt; Su
gt;
gt; =IF(A1=quot;quot;,quot;quot;,DATE(YEAR(a1),MONTH(a1)-6,DAY(a1)))
gt;
gt; Regards,
gt;
gt; Jan Karel Pieterse
gt; Excel MVP
gt; www.jkp-ads.com
gt;
gt;
- Feb 22 Thu 2007 20:35
Date forumla
close
全站熱搜
留言列表
發表留言