#1   Report Post  
Posted to microsoft.public.excel.misc
Hru48
 
Posts: n/a
Default working with dates


Hey all,

I need a cell to work to return the first and last day of the month it
is in without me having to type anything in. In the format mm/dd/yyyy -
mm/dd/yyyy

I was thinking I could use date(now) and then use date difference to
figure this out but i'm not too sure on the syntax.

Any help would be great.

Thanks.


--
Hru48
------------------------------------------------------------------------
Hru48's Profile: http://www.excelforum.com/member.php...o&userid=24895
View this thread: http://www.excelforum.com/showthread...hreadid=506719

  #2   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier
 
Posts: n/a
Default working with dates

Hi

=DATE(YEAR(TODAY()),MONTH(TODAY()),1) for first of month
=DATE(YEAR(TODAY()),MONTH(TODAY())+1,0) for last of month
works on the 0th day of a month is equal to last day of previous month

so
=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()),1),"mm/dd/yyyy") &" - " &
TEXT(DATE(YEAR(TODAY()),MONTH(TODAY())+0,0),"mm/dd/yyyy")
--
Regards

Roger Govier


"Hru48" wrote in
message ...

Hey all,

I need a cell to work to return the first and last day of the month it
is in without me having to type anything in. In the format
mm/dd/yyyy -
mm/dd/yyyy

I was thinking I could use date(now) and then use date difference to
figure this out but i'm not too sure on the syntax.

Any help would be great.

Thanks.


--
Hru48
------------------------------------------------------------------------
Hru48's Profile:
http://www.excelforum.com/member.php...o&userid=24895
View this thread:
http://www.excelforum.com/showthread...hreadid=506719



  #3   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default working with dates

On Tue, 31 Jan 2006 05:58:35 -0600, Hru48
wrote:


Hey all,

I need a cell to work to return the first and last day of the month it
is in without me having to type anything in. In the format mm/dd/yyyy -
mm/dd/yyyy

I was thinking I could use date(now) and then use date difference to
figure this out but i'm not too sure on the syntax.

Any help would be great.

Thanks.



=TEXT(TODAY()-DAY(TODAY())+1,"mm/dd/yyyy")
&" - " & TEXT(TODAY()-DAY(TODAY())+32-DAY(
TODAY()-DAY(TODAY())+32),"mm/dd/yy")


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
need to convert list of dates to count no. of dates by week neowok Excel Worksheet Functions 13 January 30th 06 03:54 PM
VLOOKUP & Dates: Why is this Formula working? Ali Excel Worksheet Functions 1 January 18th 06 01:37 PM
Tex Dates to numerical Dates ufo_pilot Excel Worksheet Functions 3 January 12th 06 02:19 AM
Is there a way to calculate business working days between dates i. hjyoungii Excel Worksheet Functions 2 February 23rd 05 04:25 PM
Formating Dates for production schedule dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 08:43 PM


All times are GMT +1. The time now is 05:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"