If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#34
|
|||
|
|||
Formula to Return the next 1st Tuesday of a Month
Thanks, Ron.....much appreciated.
"Ron Rosenfeld" wrote in message ... On Sat, 1 Dec 2007 19:55:40 -0500, "Ron Coderre" wrote: I gotta hand it to you "date" guys! I spotted the flaw in your formula around 3 hours ago. I've been trying to come up with a working formula ever since. Here's what I came up with: A1: (a date) A2: (the Weekday to return....1=Sun, 2=Mon, 3=Tue, 4=Wed, 5=Thu, 6=Fri, 7=Sat) This formula returns the NEXT first Tuesday of the month (the final "3" in the formula is the weekday to find): =MIN(CEILING(A1+1,(A1-DAY(A1)+{1;32})-DAY(A1-DAY(A1)+{1;32})+7 -MOD(6+WEEKDAY((A1-DAY(A1)+{1;32})-DAY(A1-DAY(A1)+{1;32})+1)-A2,7))) Looks good. Guess we'll be "handing it to you"!! --ron |
Thread Tools | |
Display Modes | |
|
|