Re: Excel 2007 -> Filtered Data Connection from Another Spreadsheet
- From: ramz <djramz@xxxxxxxxx>
- Date: Thu, 26 Feb 2009 10:49:41 -0800 (PST)
SELECT * FROM [Sheet1$] WHERE FiscalPeriod='Q1-2010'
^^^ gives an error message ("No value given for one or more required
parameters."). I assume this is because FiscalPeriod does not mean
anything to the query
SELECT * FROM [Sheet1$] WHERE 'FiscalPeriod'='Q1-2010'
^^^ no error message but does not return results
"FiscalPeriod" is the column header in row 1 of the source worksheet.
On Feb 26, 12:49 pm, Dick Kusleika <dkusle...@xxxxxxxxx> wrote:
On Thu, 26 Feb 2009 08:20:31 -0800 (PST), ramz <djr...@xxxxxxxxx> wrote:
no one has any ideas on this one? hrmpf.
On Feb 25, 4:46 pm, ramz <djr...@xxxxxxxxx> wrote:
So, I'm attempting to grab a subset of data from one master
spreadsheet based on the value of a cell in a specific row to
determine if it should be imported or not. I've managed to create the
connection which imports the entire table, but short of using
filtering in the importing sheet (which won't work for my purposes
because I need to do sum operations and such and the filtering only
seems to hide the rows I don't want but does not exclude data found
therein when range sums are used) I can't seem to figure out a way to
make the data connection do the filtering for me. Being that this
seems to use SQL language (and mind you, I'm not an SQL expert, but I
have picked up a few phrases along the way) I would think that I could
type something like this in the "Command Text" box in the Definition
tab of the Connection Properties dialog:
SELECT * FROM [Sheet1$] WHERE < range or column or whatever > = '<
VALUE >'
I *think* the problem is that I can't find documentation that would
tell me what the syntax of the "< range or column or whatever >" bit
would actually be. I've tried a zillion different things to no avail.
Could someone point to some documentation or provide some insight on
getting this working? Thanks!
It should be whatever is in Row 1 of Sheet1. It will assume that Row 1
contains field names. Assume A1:C2 is
Name Number Amount
Ramz 1 12.00
..WHERE Number>=1
should work for a WHERE clause.
--
Dick Kusleika
Microsoft MVP-Excelhttp://www.dailydoseofexcel.com
.
- Follow-Ups:
- Re: Excel 2007 -> Filtered Data Connection from Another Spreadsheet
- From: Dick Kusleika
- Re: Excel 2007 -> Filtered Data Connection from Another Spreadsheet
- References:
- Prev by Date: Re: Copy paste hyperlink
- Next by Date: RE: Go to cell #
- Previous by thread: Re: Excel 2007 -> Filtered Data Connection from Another Spreadsheet
- Next by thread: Re: Excel 2007 -> Filtered Data Connection from Another Spreadsheet
- Index(es):
Relevant Pages
|