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
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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)
 
Upvote 0
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 <="?"
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,048
Members
448,543
Latest member
MartinLarkin

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