Home |
Search |
Today's Posts |
#41
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Formula to Return the next 1st Tuesday of a Month
This formula will give next first Tuesday at noon, based on a cutoff of noon
on the 1st Tuesday =FLOOR(EOMONTH(FLOOR(A1+3.5,7)-4,0)+4,7)+3.5 similarly this will give last Thursday at noon also based on a cutoff at noon on last Thursday =FLOOR(EOMONTH(FLOOR(A1+1.5,7)+5,0)+2,7)-1.5 Note: only works correctly with 1900 date system "Harlan Grove" wrote: Sean wrote... Guys a twist on my OP, how could I return a similar value, but this time the "last" Thursday of each month? Last Thursday of the month for the date in cell A3 is given by =A3-WEEKDAY(A3-4,2)+7*(MATCH(TRUE,DAY(A3-WEEKDAY(A3-4,2) +7*{2;3;4;5;6})<8,0)) Make similar adjustments as in my previous response to use noon as the cutoff time on that day. Note: A3-WEEKDAY(A3-n,2) is the previous n_th day of the week before the date in cell A3, where n_th is in the same sense as WEEKDAY(.,2), i.e., 1=Monday, 2=Tuesday, etc. Then note that there are at most 5 of any given weekday in any given month. |
#42
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Formula to Return the next 1st Tuesday of a Month
daddylonglegs wrote...
This formula will give next first Tuesday at noon, based on a cutoff of noon on the 1st Tuesday =FLOOR(EOMONTH(FLOOR(A1+3.5,7)-4,0)+4,7)+3.5 similarly this will give last Thursday at noon also based on a cutoff at noon on last Thursday =FLOOR(EOMONTH(FLOOR(A1+1.5,7)+5,0)+2,7)-1.5 Note: only works correctly with 1900 date system .... Note also that in Excel 2003 and prior it requires loading the Analysis ToolPak add-in, since EOMONTH isn't a built-in function in those older versions. |
#43
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Formula to Return the next 1st Tuesday of a Month
Thanks Harlan
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
function to return day in the form "Monday", "Tuesday" etc given . | Excel Worksheet Functions | |||
dates and 1st Tuesday of month | Excel Worksheet Functions | |||
Return mm/dd/yy based on 1st Day of Month | Excel Worksheet Functions | |||
Calculating first/last Monday, Tuesday, etc. in a given month in E | Excel Worksheet Functions | |||
Return 1st of the Month | Excel Worksheet Functions |