David Schaleger
Board Regular
- Joined
- Dec 6, 2010
- Messages
- 55
I need VBA to convert several dates in a column to a 2-decimal number representing just the year and month in a YYYY.MM in the right adjacent column.
This is to faciliate filtering the date by month(s) in a pivot table. Currently, filtering the "date" field when it's placed in the "report filter" box of a pivot table pales in comparison to filtering the same date field in the data table, where I can actually select an entire month with one mouse click on a check box. Dragging the date field in the "row labels" box means using cumbersome filtering options AND having the date show up in and messy up the report when I don't need it to. So, I use the YYYY.MM format to easily select entire months with one mouse click with the date field in the "report filter" box. But manually converting dates to this format is cumbersome, as well. Thus the need for VBA.
This is to faciliate filtering the date by month(s) in a pivot table. Currently, filtering the "date" field when it's placed in the "report filter" box of a pivot table pales in comparison to filtering the same date field in the data table, where I can actually select an entire month with one mouse click on a check box. Dragging the date field in the "row labels" box means using cumbersome filtering options AND having the date show up in and messy up the report when I don't need it to. So, I use the YYYY.MM format to easily select entire months with one mouse click with the date field in the "report filter" box. But manually converting dates to this format is cumbersome, as well. Thus the need for VBA.