I'm attempting to create a MS Query to return data from a SQL database based on a value from a cell in Excel. I have actually successful accomplished this, but only for 1 row. I cant figure out how to get it to copy-down to other rows.
I've created a connection as follows:
Notice that the SQL statement includes a parameter. The parameter is set to point to a specific cell:
I guess this makes sense as I'm only looking to return 1 value per row:The problem is that I have multiple lines to return values for. How do I return a value per row for multiple rows?
I've tried changing the cell reference in the Parameters dialog box (image #2 above), but this does not work as the Excel Table is designed to grow dynamically. Is it possible to have Query several values based on different rows within Excel?
I've created a connection as follows:
![2016-12-05_12-08-30.jpg](/board/proxy.php?image=https%3A%2F%2Fwww.dropbox.com%2Fs%2Fanbamm47kaa6sw4%2F2016-12-05_12-08-30.jpg%3Fdl%3D0&hash=49308d671a5146e01161016c7b0eebb7)
Notice that the SQL statement includes a parameter. The parameter is set to point to a specific cell:
![2016-12-05_12-14-13.jpg](/board/proxy.php?image=https%3A%2F%2Fwww.dropbox.com%2Fs%2Fk8iy645mcqbm27y%2F2016-12-05_12-14-13.jpg%3Fdl%3D0&hash=e66e9d905e8b5ce2022359451c7e7cd7)
I guess this makes sense as I'm only looking to return 1 value per row:The problem is that I have multiple lines to return values for. How do I return a value per row for multiple rows?
![2016-12-05_12-22-33.jpg](/board/proxy.php?image=https%3A%2F%2Fwww.dropbox.com%2Fs%2F5j0xbayhqjx4czm%2F2016-12-05_12-22-33.jpg%3Fdl%3D0&hash=9ce2445347139e5926493ccb444bef90)
I've tried changing the cell reference in the Parameters dialog box (image #2 above), but this does not work as the Excel Table is designed to grow dynamically. Is it possible to have Query several values based on different rows within Excel?