Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Structured references in custom Data Validation expression?

I'm very keen to know how could I enter a Data Validation expression using
tables.

I have two sheets with two tables. In a certain column of the first I need
to restrict the values one can enter to the values entered in a column in the
other table.

So for ColumnX in Table1, I'd like to set a custom data validation
expression like:
=Table2[ColumnY]
to tell only values in the ColumnY column are enabled to be entered in
ColumnX.

Is there a way to do this or isn't this stuff supported?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Structured references in custom Data Validation expression?

Select all necessary cells in column X, do datavalidation, allowlist and
select the cells in column Y, deselect dropdown


--
Regards,

Peo Sjoblom



"kr/nk" wrote in message
...
I'm very keen to know how could I enter a Data Validation expression using
tables.

I have two sheets with two tables. In a certain column of the first I need
to restrict the values one can enter to the values entered in a column in
the
other table.

So for ColumnX in Table1, I'd like to set a custom data validation
expression like:
=Table2[ColumnY]
to tell only values in the ColumnY column are enabled to be entered in
ColumnX.

Is there a way to do this or isn't this stuff supported?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Structured references in custom Data Validation expression?

Hi,

Thanks for your answer.

Unfortunately the referenced cells are on other sheet. On the other hand,
I'd like to ensure that by expanding Table2, the newly included rows will be
available for choosing as a value in Table1. That's why I wouldn' like to use
a named range. Specifically the best would be to reference a column in a
table without the need of turning its cells into a range or list.

krank

"Peo Sjoblom" wrote:

Select all necessary cells in column X, do datavalidation, allowlist and
select the cells in column Y, deselect dropdown


--
Regards,

Peo Sjoblom



"kr/nk" wrote in message
...
I'm very keen to know how could I enter a Data Validation expression using
tables.

I have two sheets with two tables. In a certain column of the first I need
to restrict the values one can enter to the values entered in a column in
the
other table.

So for ColumnX in Table1, I'd like to set a custom data validation
expression like:
=Table2[ColumnY]
to tell only values in the ColumnY column are enabled to be entered in
ColumnX.

Is there a way to do this or isn't this stuff supported?




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Structured references in custom Data Validation expression?

Did you try Biff's solution? If you have the list/values in another sheet
with regards to the validation you need to give it a name or it won't work


--
Regards,

Peo Sjoblom



"kr/nk" wrote in message
...
Hi,

Thanks for your answer.

Unfortunately the referenced cells are on other sheet. On the other hand,
I'd like to ensure that by expanding Table2, the newly included rows will
be
available for choosing as a value in Table1. That's why I wouldn' like to
use
a named range. Specifically the best would be to reference a column in a
table without the need of turning its cells into a range or list.

krank

"Peo Sjoblom" wrote:

Select all necessary cells in column X, do datavalidation, allowlist
and
select the cells in column Y, deselect dropdown


--
Regards,

Peo Sjoblom



"kr/nk" wrote in message
...
I'm very keen to know how could I enter a Data Validation expression
using
tables.

I have two sheets with two tables. In a certain column of the first I
need
to restrict the values one can enter to the values entered in a column
in
the
other table.

So for ColumnX in Table1, I'd like to set a custom data validation
expression like:
=Table2[ColumnY]
to tell only values in the ColumnY column are enabled to be entered in
ColumnX.

Is there a way to do this or isn't this stuff supported?






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Structured references in custom Data Validation expression?

I'd like to ensure that by expanding Table2, the newly
included rows will be available for choosing
as a value in Table1.


In that case you simply need to make Table2 a dynamic named range.

http://contextures.com/xlNames01.html#Dynamic

Biff

"kr/nk" wrote in message
...
Hi,

Thanks for your answer.

Unfortunately the referenced cells are on other sheet. On the other hand,
I'd like to ensure that by expanding Table2, the newly included rows will
be
available for choosing as a value in Table1. That's why I wouldn' like to
use
a named range. Specifically the best would be to reference a column in a
table without the need of turning its cells into a range or list.

krank

"Peo Sjoblom" wrote:

Select all necessary cells in column X, do datavalidation, allowlist
and
select the cells in column Y, deselect dropdown


--
Regards,

Peo Sjoblom



"kr/nk" wrote in message
...
I'm very keen to know how could I enter a Data Validation expression
using
tables.

I have two sheets with two tables. In a certain column of the first I
need
to restrict the values one can enter to the values entered in a column
in
the
other table.

So for ColumnX in Table1, I'd like to set a custom data validation
expression like:
=Table2[ColumnY]
to tell only values in the ColumnY column are enabled to be entered in
ColumnX.

Is there a way to do this or isn't this stuff supported?








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Structured references in custom Data Validation expression?

Great!

Thx again,
kr/

"T. Valko" wrote:

I'd like to ensure that by expanding Table2, the newly
included rows will be available for choosing
as a value in Table1.


In that case you simply need to make Table2 a dynamic named range.

http://contextures.com/xlNames01.html#Dynamic

Biff

"kr/nk" wrote in message
...
Hi,

Thanks for your answer.

Unfortunately the referenced cells are on other sheet. On the other hand,
I'd like to ensure that by expanding Table2, the newly included rows will
be
available for choosing as a value in Table1. That's why I wouldn' like to
use
a named range. Specifically the best would be to reference a column in a
table without the need of turning its cells into a range or list.

krank

"Peo Sjoblom" wrote:

Select all necessary cells in column X, do datavalidation, allowlist
and
select the cells in column Y, deselect dropdown


--
Regards,

Peo Sjoblom



"kr/nk" wrote in message
...
I'm very keen to know how could I enter a Data Validation expression
using
tables.

I have two sheets with two tables. In a certain column of the first I
need
to restrict the values one can enter to the values entered in a column
in
the
other table.

So for ColumnX in Table1, I'd like to set a custom data validation
expression like:
=Table2[ColumnY]
to tell only values in the ColumnY column are enabled to be entered in
ColumnX.

Is there a way to do this or isn't this stuff supported?






  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Structured references in custom Data Validation expression?

Try this:

Table2 on sheet2

Give Table2 a defined name like, say, oh, I don't know, maybe Table2. <g

Then, select the cells you want to validate. Assume this range is A1:A5.

Data Validation
Allow: Custom
Formula: =OR(A1=INDEX(Table2,,n))

Where n = the column number of Table2 you're interested in

Biff

"kr/nk" wrote in message
...
I'm very keen to know how could I enter a Data Validation expression using
tables.

I have two sheets with two tables. In a certain column of the first I need
to restrict the values one can enter to the values entered in a column in
the
other table.

So for ColumnX in Table1, I'd like to set a custom data validation
expression like:
=Table2[ColumnY]
to tell only values in the ColumnY column are enabled to be entered in
ColumnX.

Is there a way to do this or isn't this stuff supported?



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Structured references in custom Data Validation expression?

Thanks to you, too.

This is still not the desired solution but based on your answers I guess I
cannot do what I exactly wanted to do but the old named ranges solution. It
was good if this cool new feature (I mean the structured references) worked
even with data validation.

"T. Valko" wrote:

Try this:

Table2 on sheet2

Give Table2 a defined name like, say, oh, I don't know, maybe Table2. <g

Then, select the cells you want to validate. Assume this range is A1:A5.

Data Validation
Allow: Custom
Formula: =OR(A1=INDEX(Table2,,n))

Where n = the column number of Table2 you're interested in

Biff

"kr/nk" wrote in message
...
I'm very keen to know how could I enter a Data Validation expression using
tables.

I have two sheets with two tables. In a certain column of the first I need
to restrict the values one can enter to the values entered in a column in
the
other table.

So for ColumnX in Table1, I'd like to set a custom data validation
expression like:
=Table2[ColumnY]
to tell only values in the ColumnY column are enabled to be entered in
ColumnX.

Is there a way to do this or isn't this stuff supported?




  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Structured references in custom Data Validation expression?

I have the same question, and no one has answered it yet. Can you use a
structured table reference instead of a named range in order to perform data
validation? In other words, instead of creating a table and having to
manually create a named range based on the table, can't I just use a formula
like =DeptSales[#Data] for a list data validation (where "DeptSales" is the
name of the table)? I get an error message when I try this...

"kr/nk" wrote:

Thanks to you, too.

This is still not the desired solution but based on your answers I guess I
cannot do what I exactly wanted to do but the old named ranges solution. It
was good if this cool new feature (I mean the structured references) worked
even with data validation.

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Structured references in custom Data Validation expression?

Well, I just answered my own question. It is possible!

Put the following in some cell in your worksheet (for instance, A1):
'INDEX(TableName[#Data],,n)

where "TableName" is the name of your table and "n" is the column number of
your table that you want to use as the validation list. Note the single
quote at the beginning.

Now select a (different) cell where you want to apply data validation, and
perform the data validation steps as usual. From the data validation
settings menu, enter the following in the "Source:" field:

=indirect(A1)

where A1 is the cell that has your table reference as mentioned earlier.

Voila! You now have a dropdown that has an updated selection list based on
your table.

I have tried putting the table reference directly into the "Source:" field
instead of pointing to a cell that has the same text, but for some reason it
won't work.

Is there a better solution?

"DanL" wrote:

I have the same question, and no one has answered it yet. Can you use a
structured table reference instead of a named range in order to perform data
validation? In other words, instead of creating a table and having to
manually create a named range based on the table, can't I just use a formula
like =DeptSales[#Data] for a list data validation (where "DeptSales" is the
name of the table)? I get an error message when I try this...

"kr/nk" wrote:

Thanks to you, too.

This is still not the desired solution but based on your answers I guess I
cannot do what I exactly wanted to do but the old named ranges solution. It
was good if this cool new feature (I mean the structured references) worked
even with data validation.



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Structured references in custom Data Validation expression?

Is there a better solution?

Well, IMHO just use standard range references. I am not a fan of structured
references.


--
Biff
Microsoft Excel MVP


"DanL" wrote in message
...
Well, I just answered my own question. It is possible!

Put the following in some cell in your worksheet (for instance, A1):
'INDEX(TableName[#Data],,n)

where "TableName" is the name of your table and "n" is the column number
of
your table that you want to use as the validation list. Note the single
quote at the beginning.

Now select a (different) cell where you want to apply data validation, and
perform the data validation steps as usual. From the data validation
settings menu, enter the following in the "Source:" field:

=indirect(A1)

where A1 is the cell that has your table reference as mentioned earlier.

Voila! You now have a dropdown that has an updated selection list based
on
your table.

I have tried putting the table reference directly into the "Source:" field
instead of pointing to a cell that has the same text, but for some reason
it
won't work.

Is there a better solution?

"DanL" wrote:

I have the same question, and no one has answered it yet. Can you use a
structured table reference instead of a named range in order to perform
data
validation? In other words, instead of creating a table and having to
manually create a named range based on the table, can't I just use a
formula
like =DeptSales[#Data] for a list data validation (where "DeptSales" is
the
name of the table)? I get an error message when I try this...

"kr/nk" wrote:

Thanks to you, too.

This is still not the desired solution but based on your answers I
guess I
cannot do what I exactly wanted to do but the old named ranges
solution. It
was good if this cool new feature (I mean the structured references)
worked
even with data validation.



  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Structured references in custom Data Validation expression?

All: I found an option that comes closer to the original intent of the
question.

Given a column of data named "ColumnX" in a table named "Table1", we have
all discovered that entering...

=Table1[[#Data],[ColumnX]]

.... in the "Source:" field of the Data Validation list dialog box will not
work.

However, the same syntax works for named ranges. For example, create a new
named range called "Test1" and enter...

=Table1[[#Data],[ColumnX]]

.... in the "Refers to" field.

Now in Data Validation, you can reference the named range "Test1" in the
"Source" field, using the syntax...

=Test1

It you add additional rows to "Table1", with new values in "ColumnX", the
data validation list is expanded accordingly. Also, sorting "ColumnX" in
"Table1" reorders the data validation list.

-------------

"DanL" wrote:

I have the same question, and no one has answered it yet. Can you use a
structured table reference instead of a named range in order to perform data
validation? In other words, instead of creating a table and having to
manually create a named range based on the table, can't I just use a formula
like =DeptSales[#Data] for a list data validation (where "DeptSales" is the
name of the table)? I get an error message when I try this...

"kr/nk" wrote:

Thanks to you, too.

This is still not the desired solution but based on your answers I guess I
cannot do what I exactly wanted to do but the old named ranges solution. It
was good if this cool new feature (I mean the structured references) worked
even with data validation.

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
Structured references & Quickbooks data Coco Excel Worksheet Functions 0 March 3rd 07 03:34 AM
custom data validation Matt Excel Discussion (Misc queries) 1 February 3rd 07 10:27 PM
Custom Data Validation Steve E Excel Discussion (Misc queries) 1 September 2nd 06 10:16 PM
Custom data validation Guy Normandeau Excel Discussion (Misc queries) 3 April 18th 06 04:12 PM
Data Validation - Custom Mary Ann Excel Discussion (Misc queries) 4 December 17th 05 09:22 PM


All times are GMT +1. The time now is 04:48 PM.

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

About Us

"It's about Microsoft Excel"