Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Links / June 2006

Tip: Looking for answers? Try searching our database.

Querying Info inside excel

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave H - 20 Jun 2006 16:40 GMT
I want to query information within my excel workbook.  This information
has been queried externally then a couple of calculated columns have
been added that include logic that MS query doesn't support.  I then
want to query this info.  I have tried formulas to pull from these
cells but as my query expands or shrinks I keep getting ref# on the
formulas where the cells no longer exist.  My solution has been to
query the query including the extra columns.  However when I distribute
my file this 2nd query file path breaks down.  Are there any better
solutions?

Signature

Dave H

ward376 - 21 Jun 2006 09:08 GMT
I've developed many projects like what you've described. I usually use
vba to calculate/filter/manipulate/format/write the values I want from
the query sheet to a report sheet.

If your report is static, just convert everything to values and
eliminate the links before distribution.
If you want your workbook to be dynamic, you have to add some controls
for the user to refresh the queries and create the output.

In essence, you'll be creating a small "application" with a user
interface (forms/controls), a container (the workbook), and output (the
finished report).
Bill Manville - 29 Jun 2006 23:19 GMT
I would avoid querying a querytable in the same file.
For one thing, I think it will be querying the copy of the file on
disc, not the open version in which you have just refreshed the first
query in.

I would refresh the first query using a macro, give its result range a
name and have your formulas reference this range in VLOOKUPs to find
the relevant data.

The macro might be something like:

 With Worksheets("WhereThe1stQueryIs").Range("A1").QueryTable
   .Refresh BackgroundQuery:=False
   With .ResultRange
     .Resize(,.Columns.Count+2).Name = "QueryPlus"
   End With
 End With
 
Then your formulas can do VLOOKUPs in the range QueryPlus which will be
the results of the query plus the extra columns.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.