Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have a function that returns a list of codes (comma seperated) from database and i want to use that list as a data validation criteria. Can anyone tell me the best way of doing it -- sean200 ----------------------------------------------------------------------- sean2000's Profile: http://www.excelforum.com/member.php...fo&userid=2459 View this thread: http://www.excelforum.com/showthread.php?threadid=38184 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() First: you need to create a database query via Data/Import (this creates worksheet level name on the query sheet.) If DV and QT are not on the same sheet: create a Name for that range (either at workbook level or in the worksheet that holds the data validation) Then: assign the name as the source for the list in datavalidation. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam sean2000 wrote : I have a function that returns a list of codes (comma seperated) from a database and i want to use that list as a data validation criteria. Can anyone tell me the best way of doing it? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not quite KIC, use as list formula:
=INDIRECT("MyQuerysheet!MyQueryName") should work, no need to add another name. DM Unseen |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thx!
good idea. never thought of that. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam DM Unseen wrote : Not quite KIC, use as list formula: =INDIRECT("MyQuerysheet!MyQueryName") should work, no need to add another name. DM Unseen |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A function which returns a comma separated list would not work with indirect
or a defined name for the list option of Data Validation in my experience. -- Regards, Tom Ogilvy "DM Unseen" wrote in message oups.com... Not quite KIC, use as list formula: =INDIRECT("MyQuerysheet!MyQueryName") should work, no need to add another name. DM Unseen |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks for the replies I wanted to avoid using the Data / Import way cause it seems like yo need a dsn set up for that database and i've been using adodb to avoi using a dsn. Basically ive got a function called getPhases() which takes a projec number from a cell and returns a list of phase codes depending on tha project number -- sean200 ----------------------------------------------------------------------- sean2000's Profile: http://www.excelforum.com/member.php...fo&userid=2459 View this thread: http://www.excelforum.com/showthread.php?threadid=38184 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sean,
just a quick note on XL and dsn. It is true you use a DSN to create a query, but after that the query will be independent from the DSN (this depends on your XL version, the behavior has changed a little). Other users don't need the DSN for your query to work. DM Unseen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Importing data via an external database query | Excel Discussion (Misc queries) | |||
Tool bar: Data/Import external data/New database query | Setting up and Configuration of Excel | |||
Importing Data via Database Query | Excel Discussion (Misc queries) | |||
database query not showing foxpro database How I import data | New Users to Excel | |||
Database Query -- Data Type Mismatch | Excel Discussion (Misc queries) |