I currently use the following VBA module code to convert dates to a Week Number:
And use the forumula to populate the cell (our week goes Fri-Thurs)
=VBWeekNum([@[Date PST]],6)
I'd like to use something similar for converting dates to month names for use in Pivot Tables (am I missing something, as it seems there should be an inherent way to do this w/in Excel - currently I'm just manually adjusting the months so my Slicer has ONE button for each month rather than one per individual date/time).
I'm a complete novice in VBA. I've tried hacking away at code provided from two other sites to no avail.
Any help greatly appreciated!
Function VBWeekNum(dt As Date, WkStart As Long) As Long
VBWeekNum = DatePart("ww", dt, WkStart)
End Function
And use the forumula to populate the cell (our week goes Fri-Thurs)
=VBWeekNum([@[Date PST]],6)
I'm a complete novice in VBA. I've tried hacking away at code provided from two other sites to no avail.
Any help greatly appreciated!