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.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Status
Not open for further replies.

Forum statistics

Threads
1,215,064
Messages
6,122,937
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top