Need to specify datafield in pivot table with listbox info

jordanf54

New Member
Joined
Jan 19, 2005
Messages
1
(I'm very, very new to VBA, so sorry for my ignorance)

I have to do a pacing report every week for our sales. I have pivot tables set up to pace our current sales for the week against last week, and the same week last year.

Currently, for example, to update the pivot tables I go to the wizard and drag the data field corresponding to last week's date and put in the data field corresponding to this week's date.

I'd like to avoid the wizard and incorporate these steps into a program to do the pivot tables in addition to several other steps I need to do.

I have a form with a list box to select the dates. How can I use the values from the listbox to put the corresponding field in the data box? (Or if you have a better idea, I am definitely open to suggestions.)

A huge Thank You in advance for any tips!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,215,039
Messages
6,122,799
Members
449,095
Latest member
m_smith_solihull

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