Data query source & criteria vary with cell value

PhilFish

New Member
Joined
Oct 25, 2005
Messages
5
I have been using Excel's data query function.

I have been able to set parameters so they are dependent on cell values. However, I want to make the Data source and Criteria dependent on cell values as well.

To be more specific, I have several worksheets, which function as separate databases. They relate to successive financial years, and so are called 0203, 0304, 0405, etc.

Each database contains column headings relating to risk categories: Governance Risk, Financial Risk, Compliance Risk, etc.

Each entry in the database contains a risk score: Low, High, Medium.

So, an organisation is given a High Financial Risk in 0405, or a Low Compliance Risk in 0304, and the results are stored in the relevant database.

I can run a Data Query using, say, the 0405 database as a Data Source and the Governance Risk column as a Category. The Parameter is based on a cell, into which user can type "Low", "Medium" or "High". This works very well, and the records pops up withoiut bother.

However, I want to have two further cells, where the user can type 0405 or 0304 to specify which database they want the data to come from, and "Governance" or "Financial" to specify what type of risk they wish to look at.

Is it possible? I'd like to avoid VBA if possible, but will take the plunge if I need to.

Thanks in advance!
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Watch MrExcel Video

Forum statistics

Threads
1,118,760
Messages
5,574,074
Members
412,566
Latest member
TexasTony
Top