LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Formula to Return the next 1st Tuesday of a Month

How can I construct a formula that will relate TODAY to the 1st
Tuesday of each month.

For example as today is 01/12/07, my formula should return 04/12/07,
but if TODAY was 05/12/07, then it should return 01/01/08 etc

Thanks


With
A1: =TODAY()

=IF(A1-DAY(A1)+7-WEEKDAY(A1-DAY(A1)+4)A1,
A1-DAY(A1)+7-WEEKDAY(A1-DAY(A1)+4),A1+32-
DAY(A1+32)+7-WEEKDAY(A1+32-DAY(A1+32)+4))


You have a minor problem in your formula... it will produce the wrong date
whenever the date in A1 is the first of the month on a Wednesday (try August
1, 2007 for example). This stems from your using the +7 and -4 adjusters.
Normally, the fix would be to use +8 and -5 (at least that would be the fix
in order to find the first such-and-such day in a month); however, I notice
that your original formula and your formula modified as I just mentioned,
both get December 31, 2008 wrong... they report February 3, 2009 instead of
January 5, 2009 as the first Tuesday of the next month (given that December
31st is greater than its own first Tuesday)... I'm not sure off-hand what,
if any, "rule" there is governing when this problem will crop up (mainly
because I didn't look for one).

Rick

 
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
function to return day in the form "Monday", "Tuesday" etc given . MTro Excel Worksheet Functions 2 October 3rd 07 09:49 AM
dates and 1st Tuesday of month Jessica[_2_] Excel Worksheet Functions 11 July 17th 07 11:13 PM
Return mm/dd/yy based on 1st Day of Month Ken Excel Worksheet Functions 5 February 9th 07 07:15 PM
Calculating first/last Monday, Tuesday, etc. in a given month in E Rossta Excel Worksheet Functions 3 May 27th 06 02:19 AM
Return 1st of the Month JJalomo Excel Worksheet Functions 12 May 18th 05 03:52 PM


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