Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am looking for a way to find the first weekday of the year, say the first
Sunday or Monday, while giving only the year to excel. For example, if I type in 2006, I want it to automatically give me the date of the first Monday of the year. Is there any function or combination of functions that will do this for me? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Eutrapelia,
(nice nickname btw, I trust you have the idea of its meaning in its original language :)) Assume the year is in A1 and in B1 you put a number from 1(Sunday) to 7(Saturday). The following formula will return the first day of your B1 choice: =DATE(A1, 1, MOD(7-DATE(A1, 1, 1)+ B1,7)+1) HTH Kostis Vezerides |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Thu, 19 Jan 2006 02:47:02 -0800, "Eutrapelia"
wrote: I am looking for a way to find the first weekday of the year, say the first Sunday or Monday, while giving only the year to excel. For example, if I type in 2006, I want it to automatically give me the date of the first Monday of the year. Is there any function or combination of functions that will do this for me? With YEAR in A1: First Sunday: =DATE(A1,1,8)-WEEKDAY(DATE(A1,1,7)) First Monday: =DATE(A1,1,8)-WEEKDAY(DATE(A1,1,6)) First Weekday: If you have the Analysis ToolPak installed: =workday(DATE(A1,1,0),1) (See HELP for the workday function for instructions on how to install it). If you do not have the ATP installed: =DATE(A1,1,0)+CHOOSE(WEEKDAY(DATE(A1,1,0)),1,1,1,1 ,1,3,2) --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need to Sum Mon-Sat each seven days; Average Sunday | Excel Worksheet Functions | |||
Upgraded to office 2003 now cannot find personal.xls | Excel Discussion (Misc queries) | |||
How do I find the cell address of the 2nd largest of a set? | Excel Discussion (Misc queries) | |||
Keep find box open while in spreadsheet | Excel Discussion (Misc queries) | |||
How to compare current year to prior year in bar chart? | Charts and Charting in Excel |