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 How to write a formula to show the "last date" of a month

I want to design a spreadsheet where I only need to enter the "month" and
"year" as the starting point, then the formula will yield the "last date" of
the months (starting from the month entered). For example, if I entered "11"
for month and "2007" for year, then I want excel to yield "11/30/2007",
"12/31/2007", "1/31/2008", etc.

How do I write this formula?

Thank you!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default How to write a formula to show the "last date" of a month

An odd little trick is to use day zero of next month to get last day of
month of interest
=DATE(B1,A1+1,0) with month (11) in A1 and year (2007) in B1
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Mary Y" wrote in message
...
I want to design a spreadsheet where I only need to enter the "month" and
"year" as the starting point, then the formula will yield the "last date"
of
the months (starting from the month entered). For example, if I entered
"11"
for month and "2007" for year, then I want excel to yield "11/30/2007",
"12/31/2007", "1/31/2008", etc.

How do I write this formula?

Thank you!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default How to write a formula to show the "last date" of a month

Hi Bernard - you're a genius!!! This formula works wonders!!! Thank you
very much. Mary


"Bernard Liengme" wrote:

An odd little trick is to use day zero of next month to get last day of
month of interest
=DATE(B1,A1+1,0) with month (11) in A1 and year (2007) in B1
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"Mary Y" wrote in message
...
I want to design a spreadsheet where I only need to enter the "month" and
"year" as the starting point, then the formula will yield the "last date"
of
the months (starting from the month entered). For example, if I entered
"11"
for month and "2007" for year, then I want excel to yield "11/30/2007",
"12/31/2007", "1/31/2008", etc.

How do I write this formula?

Thank you!




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
If date is in the month of Sept, then "1", otherwise "2" SteveC Excel Worksheet Functions 5 September 26th 07 03:58 PM
Function or formula to convert "text" month to number of month? Steve Vincent Excel Discussion (Misc queries) 5 May 15th 07 01:11 AM
write a "if" command. day of month + remainder Dave1940 Excel Worksheet Functions 1 April 20th 06 05:34 PM
Function or formula to convert "text" month to number of month? Kevin Vaughn Excel Discussion (Misc queries) 0 February 4th 06 04:45 PM
conditional formula to show "open" or "closed" SBS Excel Worksheet Functions 6 January 28th 06 01:48 AM


All times are GMT +1. The time now is 12:23 AM.

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

About Us

"It's about Microsoft Excel"