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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,215,730
Messages
6,126,529
Members
449,316
Latest member
sravya

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