SyntaxFix
Write A Post
Hire A Developer
Questions
Tags
I am trying to get the current year using VBA. Is there any pre-build function available to find out the current year?
This question is related to excel vba date
excel
vba
date
Year(Date)
Year(): Returns the year portion of the date argument. Date: Current date only.
Year()
Date
Explanation of both of these functions from here.
Try =Year(Now()) and format the cell as General.
=Year(Now())
General
Source: Stackoverflow.com