Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old May 27th 09, 03:40 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Mar 2007
Posts: 15
Default Query criteria based on a changing criteria list

I am trying to create a query that I can update that will return values based
on criteria from a list of values. Right now I have a range defined as
=OFFSET(RangeValues!$B$2,0,0,COUNT(RangeValues!$B: $B),1) that holds the
criteria I want to query by. I would like for the query to alter its
selection criteria based on what is keyed into column B of the “RangeValues”
worksheet. Hopefully the finished product would be for me to
add/delete/update values in column B, then run a macro (or refresh a query)
that will return data based on what is currently in column B.

I am connecting through an ODBC and can get the results I want if I copy and
paste the criteria values into the SQL each time they change, but I cant get
it to work based on a dynamic range of values.

I am open to try solutions in VBA or the Excel Query Builder, I'm desperate.

Any help would be greatly appreciated.



  #2   Report Post  
Old May 27th 09, 03:47 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Mar 2007
Posts: 15
Default Query criteria based on a changing criteria list

meant to post this in the programming section...



"bwilk77" wrote:

I am trying to create a query that I can update that will return values based
on criteria from a list of values. Right now I have a range defined as
=OFFSET(RangeValues!$B$2,0,0,COUNT(RangeValues!$B: $B),1) that holds the
criteria I want to query by. I would like for the query to alter its
selection criteria based on what is keyed into column B of the “RangeValues”
worksheet. Hopefully the finished product would be for me to
add/delete/update values in column B, then run a macro (or refresh a query)
that will return data based on what is currently in column B.

I am connecting through an ODBC and can get the results I want if I copy and
paste the criteria values into the SQL each time they change, but I cant get
it to work based on a dynamic range of values.

I am open to try solutions in VBA or the Excel Query Builder, I'm desperate.

Any help would be greatly appreciated.


  #3   Report Post  
Old May 27th 09, 04:03 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Aug 2006
Posts: 1,696
Default Query criteria based on a changing criteria list

Glad we culd be of assistance! :-)

"bwilk77" wrote:

meant to post this in the programming section...



"bwilk77" wrote:

I am trying to create a query that I can update that will return values based
on criteria from a list of values. Right now I have a range defined as
=OFFSET(RangeValues!$B$2,0,0,COUNT(RangeValues!$B: $B),1) that holds the
criteria I want to query by. I would like for the query to alter its
selection criteria based on what is keyed into column B of the “RangeValues”
worksheet. Hopefully the finished product would be for me to
add/delete/update values in column B, then run a macro (or refresh a query)
that will return data based on what is currently in column B.

I am connecting through an ODBC and can get the results I want if I copy and
paste the criteria values into the SQL each time they change, but I cant get
it to work based on a dynamic range of values.

I am open to try solutions in VBA or the Excel Query Builder, I'm desperate.

Any help would be greatly appreciated.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract list of units based on error criteria to new list Sheila Excel Worksheet Functions 14 August 9th 07 03:57 AM
Extract list of units based on error criteria to new list Sheila Excel Worksheet Functions 0 August 9th 07 01:50 AM
Criteria Based List jackie Excel Discussion (Misc queries) 3 June 11th 07 09:02 PM
Return value from list based on criteria [email protected] Excel Worksheet Functions 2 October 3rd 06 10:44 AM
add to a cell on a list based on two criteria gabrielinlompoc New Users to Excel 0 February 9th 06 10:07 PM


All times are GMT +1. The time now is 11:00 PM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright 2004-2021 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017