Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Given a date, how do I get the 1st date and the last date of theprevious month?

This is very useful in creating an invoice, in which case, you usually
create an invoice for the last month.

So, given today Arpil 1, 2009, how to get March 1, 2009 and March 31,
2009

Suppose I have 04/01/2009 in A3

I have been able to find the first date of March through this in for
example F8.

= TEXT(DATE(YEAR(A3), MONTH(A3)-1, 1), "mm/dd/yyyy")

Now, how do I find the last date of the previous month?

Thank you.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Given a date, how do I get the 1st date and the last date of theprevious month?

On Apr 1, 5:25*pm, "Don Guillett" wrote:
How about the 1st day of this month minus ONE

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Author" wrote in message


Sounds cool, but how? I am not an Excel person.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 248
Default Given a date, how do I get the 1st date and the last date of the p

=DATE(YEAR(A3),MONTH(A3),0)
for last day of pervious month

and
=DATE(YEAR(A3),MONTH(A3)-1,1)

for the first day of previous month...

If you want in text format then put TEXT around it with desired format...

--

-Sheeloo
-------------------------------------
Pl. click ''Yes'' if this was helpful...



"Author" wrote:

This is very useful in creating an invoice, in which case, you usually
create an invoice for the last month.

So, given today Arpil 1, 2009, how to get March 1, 2009 and March 31,
2009

Suppose I have 04/01/2009 in A3

I have been able to find the first date of March through this in for
example F8.

= TEXT(DATE(YEAR(A3), MONTH(A3)-1, 1), "mm/dd/yyyy")

Now, how do I find the last date of the previous month?

Thank you.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Given a date, how do I get the 1st date and the last date of the previous month?

For the last day of the previous month:

=A3-DAY(A3)

For the first day of the previous month:

=DATE(YEAR(A3),MONTH(A3)-1,1)

--
Biff
Microsoft Excel MVP


"Author" wrote in message
...
This is very useful in creating an invoice, in which case, you usually
create an invoice for the last month.

So, given today Arpil 1, 2009, how to get March 1, 2009 and March 31,
2009

Suppose I have 04/01/2009 in A3

I have been able to find the first date of March through this in for
example F8.

= TEXT(DATE(YEAR(A3), MONTH(A3)-1, 1), "mm/dd/yyyy")

Now, how do I find the last date of the previous month?

Thank you.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Given a date, how do I get the 1st date and the last date of the previous month?

On Wed, 1 Apr 2009 14:14:37 -0700 (PDT), Author wrote:

This is very useful in creating an invoice, in which case, you usually
create an invoice for the last month.

So, given today Arpil 1, 2009, how to get March 1, 2009 and March 31,
2009

Suppose I have 04/01/2009 in A3

I have been able to find the first date of March through this in for
example F8.

= TEXT(DATE(YEAR(A3), MONTH(A3)-1, 1), "mm/dd/yyyy")

Now, how do I find the last date of the previous month?

Thank you.


Some date in A1.

First date of previous month:

=A1-DAY(A1)-DAY(A1-DAY(A1))+1

or

=DATE(YEAR(A1), MONTH(A1)-1,1)

Last Date of previous month:

=A1-DAY(A1)

--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
Dates - Need to display date one month prior to user-entered date brettopp Excel Worksheet Functions 13 December 3rd 07 05:58 PM
Date arithmetic: adding 1 month to prior end of month date manxman Excel Worksheet Functions 2 July 14th 06 09:29 PM
Sort month/date/year data using month and date only SMW820 Excel Discussion (Misc queries) 6 June 22nd 06 05:14 PM
=VLOOKUP(1,Nationality!B5:B29,IF(MONTH(date)6,MONTH(date)-6, MON Ali Excel Worksheet Functions 14 January 18th 06 08:20 AM
Calculate month-end date from date in adjacent cell? Matt D Francis Excel Worksheet Functions 4 May 19th 05 04:55 AM


All times are GMT +1. The time now is 10:42 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"