LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default dates and 1st Tuesday of month

Yeah, I'm just feeling blah today. No energy or enthusiasm.

Anyhow, if you inserted a new row 1, then:

ROW(A1)

Becomes

ROW(A2)

Just my personal preference to (almost) always "hardcode" rows/columns.

--
Biff
Microsoft Excel MVP


"Rick Rothstein (MVP - VB)" wrote in
message ...
LOL ... having one of those days, eh Biff?

As for your formula, I think you can shorten it by going back to the ROW
function call I used (instead of your ROWS one)... unless I am missing
something obvious, I am pretty sure that the only insertions that could
possibly hurt the calculated series is an insertion in the middle of the
series of dates itself... and, in thinking about it some more, I am not
entirely sure an internal insertion hurts it either.

Rick



"T. Valko" wrote in message
...
"T. Valko" wrote in message
...
"T. Valko" wrote in message
...
"Rick Rothstein (MVP - VB)" wrote in
message ...
One way,

first formula, assume you put it in C27

=C26-DAY(C26)+8-WEEKDAY(C26-DAY(C26)+5)


will give you the first Tuesday's date of the month and year in C26
assuming you have a real date in C26, so if you have 07/01/07 it will
return 07/03/07

then in C28 put

=DATE(YEAR(C27),MONTH(C27)+1,1)-DAY(DATE(YEAR(C27),MONTH(C27)+1,1))+8-WEEKDAY(DATE(YEAR(C27),MONTH(C27)+1,1)-DAY(DATE(YEAR(C27),MONTH(C27)+1,1))+5)


select C28 and copy down as long as needed

You can do this with a single formula if desired. Place this formula

=DATE(YEAR($C$26),MONTH($C$26)+ROW(A1)-1,1+MOD(10-WEEKDAY(DATE(YEAR($C$26),MONTH($C$26)+ROW(A1)-1,1)),7))

in C27 (or any other starting cell for that matter) and copy down. If
one wanted to place this first Tuesdays across columns instead of down
rows, then replace the ROW function calls with COLUMN function calls
instead.

Rick

A few keystrokes shorter and robust against inserting a new row 1.

=DATE(YEAR(C$26),MONTH(C$26)+ROWS($1:1)-1,8)-WEEKDAY(DATE(YEAR(C$26),MONTH(C$26)+ROWS($1:1)-1,5))

--
Biff
Microsoft Excel MVP


Ooops!

Disregard!


Eh, I'm having one of those days! Just can't seem to get my brain in
gear.

Disregard my disregard. The formula *does* work. In further testing I
made a change and didn't make the reference absolute which threw me for a
loop!

--
Biff
Microsoft Excel MVP




 
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
Every 1st, 3rd, 5th Tuesday Rick[_3_] Excel Worksheet Functions 9 June 12th 07 02:05 PM
Calculating first/last Monday, Tuesday, etc. in a given month in E Rossta Excel Worksheet Functions 3 May 27th 06 02:19 AM
Dates - Several Days In a month to month only Andy_Pimp Excel Discussion (Misc queries) 1 February 28th 06 11:11 AM
dates in one month Vibeke Excel Worksheet Functions 5 January 27th 06 12:26 AM
dates, 1st of month LatinViolin Excel Worksheet Functions 3 February 21st 05 04:38 PM


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