pointing to the full list from a database query

  • Thread starter Thread starter Kashgarinn
  • Start date Start date
K

Kashgarinn

Hi there, I have an excel sheet where there's a SQL query which grabs a
few columns from an access database.

Actually there are two or more SQL queries on the same sheet, and I
search for a number X, and query 1 gives me a few columns related to X
from one access database, and Query 2 gives me a few columns more on X
from another database. Query 1 starts at in sheet 'Data!B2' and query
2 starts 2-3 rows below the last row in query 1.

Sometimes that is just a single row from both queries, sometimes it
means I get 10 rows of data each.

Now, I want to work with the data from one of the columns from one of
the queries, no matter how many rows the column has (it changes with
value for X)

What's the best way to do this? I don't like the idea of having the
data on lots of different sheets.. would like to have all of the
queries (there are more to come later) on the same 'data' sheet and
after I've worked with the data, instance what I need to an 'overview'
sheet.

any good ideas?

K.
 
If I understand you correctly, a formula like:

=AVERAGE(B2:B11)

will work correctly regardless of the number of filled cells in the
range. Such a formula can be placed anywhere below B11 or above B2 (if
you have a limited set of formulas you can consider placing them above
the data).

Does this help?

Kostis Vezerides
 

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

Back
Top