I am given the year (say 2009) in Cell A1.
The requirement is to put the date of last sunday of the year (2009) in cell A2. how to do this?
I am given the year (say 2009) in Cell A1.
The requirement is to put the date of last sunday of the year (2009) in cell A2. how to do this?
Last edited by xxxyyyy; 01-12-2010 at 11:30 PM.
Perhaps
A2: =DATE(A1,12,31)+1-WEEKDAY(DATE(A1,12,31))
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Hi,
One way
RegardsPlease Login or Register to view this content.
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
For 2009, it [Richard's formula] gave answer as 12-25, whereas it should have been 12-27....
Last edited by Paul; 01-13-2010 at 01:41 AM. Reason: removed quote of entire post and added reference
They both work fine for me.
Dom
"May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."
Use code tags when posting your VBA code: [code] Your code here [/code]
Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.
i would have then made a mistake in typing the formulae... will check again.
Last edited by Paul; 01-13-2010 at 01:42 AM. Reason: Removed full quote again. Please avoid doing that again.
Hi,
See attached file for Last sunday with inputs for date ...
HTH
Thanks the problem is solved.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks