hey all,
I have worked out the first and last day of the month by using these
formulas
cell A1 is =NOW()
cell B1 is =DATE(YEAR(A1), MONTH(A1),1)
cell c1 is =DATE(YEAR(A1),MONTH(A1) 1,0)
and now I want the results of B1 and C1 in one cell which I thought I
could do with, cell D1 is =b1amp;quot; - quot;amp;c1
but everytime I try this I loose the date format in D1 and I can't get
it back.
Anyone got any ideas.
Cheers--
Hru48
------------------------------------------------------------------------
Hru48's Profile: www.excelforum.com/member.php...oamp;userid=24895
View this thread: www.excelforum.com/showthread...hreadid=506733=TEXT(B1,quot;dd/mm/yyyyquot;)amp;quot; - quot;amp;TEXT(C1,quot;dd/mm/yyyyquot;)
--
HTH
Bob Phillips
(remove nothere from the email address if mailing direct)
quot;Hru48quot; gt; wrote in
message ...
gt;
gt; hey all,
gt;
gt; I have worked out the first and last day of the month by using these
gt; formulas
gt;
gt; cell A1 is =NOW()
gt; cell B1 is =DATE(YEAR(A1), MONTH(A1),1)
gt; cell c1 is =DATE(YEAR(A1),MONTH(A1) 1,0)
gt;
gt; and now I want the results of B1 and C1 in one cell which I thought I
gt; could do with, cell D1 is =b1amp;quot; - quot;amp;c1
gt;
gt; but everytime I try this I loose the date format in D1 and I can't get
gt; it back.
gt;
gt; Anyone got any ideas.
gt;
gt; Cheers
gt;
gt;
gt; --
gt; Hru48
gt; ------------------------------------------------------------------------
gt; Hru48's Profile:
www.excelforum.com/member.php...oamp;userid=24895
gt; View this thread: www.excelforum.com/showthread...hreadid=506733
gt;
Modify the data values to strings using this variant of your existing formula:
=Text(b1,quot;m/d/yyyyquot;)amp;quot; - quot;amp;Text(c1,quot;m/d/yyyyquot;)
If you want different date formats, you can use quot;dddd, mmmm d, yyyyquot;,
quot;yy-mmm-ddquot;, just to name a few...
--
Kevin Backmannquot;Hru48quot; wrote:
gt;
gt; hey all,
gt;
gt; I have worked out the first and last day of the month by using these
gt; formulas
gt;
gt; cell A1 is =NOW()
gt; cell B1 is =DATE(YEAR(A1), MONTH(A1),1)
gt; cell c1 is =DATE(YEAR(A1),MONTH(A1) 1,0)
gt;
gt; and now I want the results of B1 and C1 in one cell which I thought I
gt; could do with, cell D1 is =b1amp;quot; - quot;amp;c1
gt;
gt; but everytime I try this I loose the date format in D1 and I can't get
gt; it back.
gt;
gt; Anyone got any ideas.
gt;
gt; Cheers
gt;
gt;
gt; --
gt; Hru48
gt; ------------------------------------------------------------------------
gt; Hru48's Profile: www.excelforum.com/member.php...oamp;userid=24895
gt; View this thread: www.excelforum.com/showthread...hreadid=506733
gt;
gt;
try using TEXT
=text(b1,quot;mm/dd/yyquot;)
--
Don Guillett
SalesAid Software
quot;Hru48quot; gt; wrote in
message ...
gt;
gt; hey all,
gt;
gt; I have worked out the first and last day of the month by using these
gt; formulas
gt;
gt; cell A1 is =NOW()
gt; cell B1 is =DATE(YEAR(A1), MONTH(A1),1)
gt; cell c1 is =DATE(YEAR(A1),MONTH(A1) 1,0)
gt;
gt; and now I want the results of B1 and C1 in one cell which I thought I
gt; could do with, cell D1 is =b1amp;quot; - quot;amp;c1
gt;
gt; but everytime I try this I loose the date format in D1 and I can't get
gt; it back.
gt;
gt; Anyone got any ideas.
gt;
gt; Cheers
gt;
gt;
gt; --
gt; Hru48
gt; ------------------------------------------------------------------------
gt; Hru48's Profile:
gt; www.excelforum.com/member.php...oamp;userid=24895
gt; View this thread: www.excelforum.com/showthread...hreadid=506733
gt;
Many thanks all!--
Hru48
------------------------------------------------------------------------
Hru48's Profile: www.excelforum.com/member.php...oamp;userid=24895
View this thread: www.excelforum.com/showthread...hreadid=506733
- May 16 Wed 2007 20:37
date format
close
全站熱搜
留言列表
發表留言