NEED VBA GENIUS

Status
Not open for further replies.
L

Legacy 55353

Guest
Hi,

I am having trouble writing 2 codes for 2 command buttons.

Code #1
The first code is to show only specific dates in a pivot table. I have a pivot table with dates from 1/1/04 to the current date. I need to turn on different date ranges every week. I.E. This week I need the dates from 12/10/05 to 12/18/05. I am looking for a code that will show only the dates including and between the dates of my range. Right now I have a begin date in cell A1 and an end date in cell A2. The pivot table item I am working with is called "Release Date" and I am looking for a code that will turn on the dates including and between the date in cell A1 and the date in cell A2. I would need to use this code for multiple pivot tables. I was using a call function but cannot figure out the right code.


Code #2 is probably more complicated.
Now I am working with 2 pivot table Items, i.e. "Release Date" and "Receipt Date." Both the release date and receipt date fields have a blank date "01/01/00" along with all the dates from 1/1/04.
I need this code to manipulate BOTH the release and receipt date fields.

FOR THE RELEASE DATE: I need the code to turn on only the blank date and anything after a certain date (usually the last friday). SO for today 12/28/05: I need only 01/01/00 and any date after 12/23/05 turned on.

FOR THE RECEIPT DATE: I need the code to turn on all the dates except the "01/01/00" and the days after 12/23/05 Friday. SO for today the dates that would be turned on would be all the dates from 01/01/04 to 12/23/05.

Again I am using this code for multiple pivots.

I can email you the file. I really appreciate any help. I have been trying to figure out the code for months. I can't find anything on the internet. Thank you. You can email me guitarfish222 at hotmail dot com and I can send you the file. Thanks again.
 

Some videos you may like

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Status
Not open for further replies.

Watch MrExcel Video

Forum statistics

Threads
1,118,084
Messages
5,570,131
Members
412,305
Latest member
Mozz
Top