Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
j j is offline
external usenet poster
 
Posts: 128
Default How can i set a formula which shows 2nd last Monday of the month?

One mo-
1. How can i set a formula which shows 2nd last Monday of the month?
A1 = 2009/07/10
A2 = 2009/07/20 (a formula which shows 2nd last Monday of the month)

OR

A1 = 2009/07/22
A2 = 2009/08/24 (a formula which shows 2nd last Monday of the month)
--
J
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default How can i set a formula which shows 2nd last Monday of the month?

Try with date in A1

In B1
=(DATE(YEAR(A1),MONTH(A1)+1,1)-1)-WEEKDAY((DATE(YEAR(A1),MONTH(A1)+1,1)-1))-5

If this post helps click Yes
---------------
Jacob Skaria


"J" wrote:

One mo-
1. How can i set a formula which shows 2nd last Monday of the month?
A1 = 2009/07/10
A2 = 2009/07/20 (a formula which shows 2nd last Monday of the month)

OR

A1 = 2009/07/22
A2 = 2009/08/24 (a formula which shows 2nd last Monday of the month)
--
J

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
j j is offline
external usenet poster
 
Posts: 128
Default How can i set a formula which shows 2nd last Monday of the mon

yes. it works

thx
--
J


"Jacob Skaria" wrote:

Try with date in A1

In B1
=(DATE(YEAR(A1),MONTH(A1)+1,1)-1)-WEEKDAY((DATE(YEAR(A1),MONTH(A1)+1,1)-1))-5

If this post helps click Yes
---------------
Jacob Skaria


"J" wrote:

One mo-
1. How can i set a formula which shows 2nd last Monday of the month?
A1 = 2009/07/10
A2 = 2009/07/20 (a formula which shows 2nd last Monday of the month)

OR

A1 = 2009/07/22
A2 = 2009/08/24 (a formula which shows 2nd last Monday of the month)
--
J

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default How can i set a formula which shows 2nd last Monday of the mon

There is a small correction to the formula..To see the error try a date in A1
of May2009 with the previous formula and the current.

=(DATE(YEAR(A1),MONTH(A1)+1,1)-1)-WEEKDAY((DATE(YEAR(A1),MONTH(A1)+1,1)-1))-IF(WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,1)-1)=1,12,5)

If this post helps click Yes
---------------
Jacob Skaria


"J" wrote:

yes. it works

thx
--
J


"Jacob Skaria" wrote:

Try with date in A1

In B1
=(DATE(YEAR(A1),MONTH(A1)+1,1)-1)-WEEKDAY((DATE(YEAR(A1),MONTH(A1)+1,1)-1))-5

If this post helps click Yes
---------------
Jacob Skaria


"J" wrote:

One mo-
1. How can i set a formula which shows 2nd last Monday of the month?
A1 = 2009/07/10
A2 = 2009/07/20 (a formula which shows 2nd last Monday of the month)

OR

A1 = 2009/07/22
A2 = 2009/08/24 (a formula which shows 2nd last Monday of the month)
--
J

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default How can i set a formula which shows 2nd last Monday of the mon

On Tue, 30 Jun 2009 03:46:02 -0700, J wrote:

yes. it works

thx
--
J


"Jacob Skaria" wrote:

Try with date in A1

In B1
=(DATE(YEAR(A1),MONTH(A1)+1,1)-1)-WEEKDAY((DATE(YEAR(A1),MONTH(A1)+1,1)-1))-5

If this post helps click Yes
---------------
Jacob Skaria


"J" wrote:

One mo-
1. How can i set a formula which shows 2nd last Monday of the month?
A1 = 2009/07/10
A2 = 2009/07/20 (a formula which shows 2nd last Monday of the month)

OR

A1 = 2009/07/22
A2 = 2009/08/24 (a formula which shows 2nd last Monday of the month)
--
J



There seem to be a number of instances for which this formula returns the Last
Monday, and not the second to last Monday.

For example: 10-May-2009 -- 25-May-2009
January 2010 also -- Last Monday
Feb 2010

Try this instead:

=DATE(YEAR(A1),MONTH(A1)+1,-6)-
WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,0)-1)

--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default How can i set a formula which shows 2nd last Monday of the month?

=EOMONTH(A1,0)-WEEKDAY(EOMONTH(A1,0),3)-7


"J" wrote:

One mo-
1. How can i set a formula which shows 2nd last Monday of the month?
A1 = 2009/07/10
A2 = 2009/07/20 (a formula which shows 2nd last Monday of the month)

OR

A1 = 2009/07/22
A2 = 2009/08/24 (a formula which shows 2nd last Monday of the month)
--
J

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
Find date of first Monday of each month Ian R Excel Discussion (Misc queries) 7 June 29th 08 08:58 PM
Date calculation for Monday of one month to the Monday of the next Sunnyskies Excel Discussion (Misc queries) 19 July 2nd 07 12:08 PM
Calculating first/last Monday, Tuesday, etc. in a given month in E Rossta Excel Worksheet Functions 3 May 27th 06 02:19 AM
1st Monday of a month in date range?? scwilly Excel Worksheet Functions 22 April 26th 06 04:49 AM
Finding the date on the 'nth' Monday in this Month in this Year agarwaldvk Excel Worksheet Functions 1 April 17th 06 10:53 PM


All times are GMT +1. The time now is 09:06 PM.

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"