Re: Filter question by Shane
Shane
Sun May 11 11:55:11 CDT 2008
Hi Elsa,
I assume you are trying to filter the pivot table, not the data area of the
pivot table. Here is one way you can do this:
1. Suppose your dates (in the data area) are in column F starting on row 4.
In the data area create a new field (column), say column G, and enter the
formula
=AND(F4>=DATE(2008,1,1),F4<TODAY()) in cell G4. Fill it down if necessary.
2. Suppose your dates are in the Row Labels area of the pivot table. Add
the new field so that the dates are one level below it.
3. Filter on the new field choosing True.
If you want to be fancy you could change the formula to read:
=IF(AND(F4>=DATE(2008,1,1),F4<TODAY()),"Current")
Then when you filter you would choose Current.
Cheers,
Shane Devenshire
Microsoft Excel MVP
"Elsa L." <ElsaL@discussions.microsoft.com> wrote in message
news:42D7F786-4B93-41A6-9ED3-22911435CA99@microsoft.com...
> Hi,
> I have a Pivot Table in Excel 2007 with data. I have a Date column. I need
> to filter the data so it shows me the data from 01-01-2008 and today date
> minus 1 day. I would like to have the data filtered automatically (without
> having to go everyday manually and change the filter date).
>
> I can see some auto filters to filter for yesterday, today, the last
> month,
> year to date, etc. I tried the Between option but it only lets me define
> dates, it doesn't let me define references to other cells or formulas
> (like
> =today()-1 for example)...
>
> Can anyone help me on this please?
>
> Thanks in advance,
> Elsa