Filter a pivot table in a macro

J

Jean-Marc P

Hi,

I download a spreadsheet every week, with one of the fields being a date. I
need to take out only the dates between the current day & 3 months later.
When I do a macro, it just won't let me filter the pivottable. How can I do
this ?

Thanks for your help !
 
B

Bernie Deitrick

Jean-Marc,

Do you have a Pivot Table or a database?

Describe the structure of whichever you have, and we'll go from there.

HTH,
Bernie
MS Excel MVP
 
J

Jean-Marc P

I import a .txt file (separated with ","). There a 3 columns that I'm
interested in: "Part number","Required Date" & "Required quantity". I need
the minimum quantity required for each part, so I created a pivot table with,
on the left: Req.Date, on top: Part Number & in the middle: min Qty Required.
NOw when I download that file, i get the info for the 6 previous months plus
the next year. I only want to show the next 3 months in my pivot table. How
can I do this ? Even if I sort the data that I get, when I update the pivot
table, the non-desired dates are still shown.

Thanks again !

Jean-Marc
 
R

Roger Govier

Hi

Perhaps you could group dates by Month and Day, making the earliest date the
first date you require, and the latest date 3 months later.
Exclude the results for date < and Greater tan the relevant dates, and only
select the Months.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top