Date Range in Excel

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MRobbins
    New Member
    • Nov 2008
    • 1

    Date Range in Excel

    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!
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    In the Formula Box for the cell, place this:

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

    Linq ;0)>

    Comment

    Working...