Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Sorry Posted in wrong forum
I want to find the day of the week on which the 1st Jan falls in the year I input. For example: in A1 all I want to enter is a year e.g. 2006. In B1 I want a formula that will return the value SUNDAY. I can get the formula to work if I enter 1/1/06 in A1 but I just want to enter the year. I tried using Concatenate to add 1/1/ to the value in A1 but couldn't get excel to recognise the concatenation as a date. Any ideas? thanks mjd |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=TEXT(DATE(a1,1,1),"dddd")
-- Kevin Vaughn "dalymjl" wrote: Sorry Posted in wrong forum I want to find the day of the week on which the 1st Jan falls in the year I input. For example: in A1 all I want to enter is a year e.g. 2006. In B1 I want a formula that will return the value SUNDAY. I can get the formula to work if I enter 1/1/06 in A1 but I just want to enter the year. I tried using Concatenate to add 1/1/ to the value in A1 but couldn't get excel to recognise the concatenation as a date. Any ideas? thanks mjd -- dalymjl |
#3
![]() |
|||
|
|||
![]() Quote:
That worked fine. Would you know how I could test the year entered in A1 to return TRUE if the year is a leap year and FALSE if not. I can do this if a full date is entered using = IF(MONTH(DATE(YEAR(A1),2,29))=2,TRUE,FALSE). However I can't get it to work if A1 contains only the year. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Just replace YEAR(A1) in your formula with A1 - also the IF function is redundant so this suffices =MONTH(DATE(A1,2,29))=2 -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=503560 |
#5
![]() |
|||
|
|||
![]() Quote:
regards mjd |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Return the day of week for 1 January | About this forum | |||
Macro to copy cells to rows below | Excel Discussion (Misc queries) | |||
Macro to insert copied cells | Excel Discussion (Misc queries) | |||
Return Sundays date of current week | Excel Worksheet Functions | |||
user defined function | Excel Worksheet Functions |