By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,378 Members | 3,020 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,378 IT Pros & Developers. It's quick & easy.

Date Range in Excel

P: 1
I need to write a code for VBA that displays the first and last day of the year. Basically it will need to return the follwing into a cell in Excel,

January 1, YYYY - December 31, YYYY

Where YYYY will be the current year. I'm not sure how to make it only change the year. Thanks!
Nov 4 '08 #1
Share this Question
Share on Google+
1 Reply


missinglinq
Expert 2.5K+
P: 3,532
In the Formula Box for the cell, place this:

="January 1, " &YEAR(TODAY()) & "-" & "December 31, " & YEAR(TODAY())

Linq ;0)>
Nov 4 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.