Filter external data based on Named Ranged Criteria

greeman

New Member
Joined
Jul 31, 2005
Messages
38
I have a pivot table based on external data from an access database.
One of the fieds is period in "YYYMM" format.

I want to have the excel query filter the data based to <= based
on a "YYYYDD" enter in cell A1
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

XLGibbs

Well-known Member
Joined
Feb 25, 2005
Messages
2,446
You can edit the query and instead of leaving the criteria for that field blank, you can place a ? in the criteria for that column identifying it as a paramater.

When you first run the query you can enter any parameter you like, but you can then edit the query properties once back in excel and tell it to look at a cell on the sheet for the parameter (and also set it to auto-refresh if the value changes, or on file open etc)
 

greeman

New Member
Joined
Jul 31, 2005
Messages
38
Need more advice

Thanks for the help so far, buit I've gotten stuck.

How do I set the value in the query criteria to point to the cell. at present it simple says <="?"
 

XLGibbs

Well-known Member
Joined
Feb 25, 2005
Messages
2,446
You have to enclose the parameter in [ ] when first enteriing the criteria...

try
Code:
 <= [?]
[code]

I sent you an email with screen shots as well.
 

Watch MrExcel Video

Forum statistics

Threads
1,119,128
Messages
5,576,251
Members
412,709
Latest member
Rishu
Top