Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Location: Ireland
Posts: 29
Post Return day of week for 1 January

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin Vaughn
 
Posts: n/a
Default Return day of week for 1 January

=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   Report Post  
Junior Member
 
Location: Ireland
Posts: 29
Default

Quote:
Originally Posted by Kevin Vaughn
=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
Thanks Kevin,

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Return day of week for 1 January


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   Report Post  
Junior Member
 
Location: Ireland
Posts: 29
Default

Quote:
Originally Posted by daddylonglegs
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
Excellent!! Thanks very much.

regards

mjd
Reply
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
Return the day of week for 1 January dalymjl About this forum 0 January 20th 06 08:17 PM
Macro to copy cells to rows below [email protected] Excel Discussion (Misc queries) 1 January 20th 06 06:59 PM
Macro to insert copied cells [email protected] Excel Discussion (Misc queries) 17 January 18th 06 10:40 AM
Return Sundays date of current week durex Excel Worksheet Functions 1 October 13th 05 04:37 PM
user defined function Brian Rogge Excel Worksheet Functions 5 May 23rd 05 06:21 PM


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