ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   pointing to the full list from a database query (https://www.excelbanter.com/excel-discussion-misc-queries/71547-pointing-full-list-database-query.html)

Kashgarinn

pointing to the full list from a database query
 

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.


--
Kashgarinn
------------------------------------------------------------------------
Kashgarinn's Profile: http://www.excelforum.com/member.php...fo&userid=7951
View this thread: http://www.excelforum.com/showthread...hreadid=512298


vezerid

pointing to the full list from a database query
 
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



All times are GMT +1. The time now is 08:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com