Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 88
Default if condition with data validation list

i would like a list for data validation, but the list could be from different
tabs.

with validation criteria, allow custom:


=INDIRECT("'"&VLOOKUP(H5,Suppliers!A:B,2,FALSE)&"' !$a:$A")

all data will be in column A, but different tabs. when i use the above
formulae, i get an error message indicating that i cannot use references to
other worksheets or workbooks for Data Validation criteria. But if i use the
formula "=items" it references the list from a different worksheet.

any suggestions to get past this?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default if condition with data validation list

any suggestions to get past this?

No. That's how it works.

You can't directly reference the source if it's on another sheet.


--
Biff
Microsoft Excel MVP


"jatman" wrote in message
...
i would like a list for data validation, but the list could be from
different
tabs.

with validation criteria, allow custom:


=INDIRECT("'"&VLOOKUP(H5,Suppliers!A:B,2,FALSE)&"' !$a:$A")

all data will be in column A, but different tabs. when i use the above
formulae, i get an error message indicating that i cannot use references
to
other worksheets or workbooks for Data Validation criteria. But if i use
the
formula "=items" it references the list from a different worksheet.

any suggestions to get past this?




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default if condition with data validation list

I think that you just need to define a name for Suppliers!A:B, let's say
_suppliers, and use

=INDIRECT("'"&VLOOKUP(H5,_suppliers,2,FALSE)&"'!$A :$A")


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"jatman" wrote in message
...
i would like a list for data validation, but the list could be from
different
tabs.

with validation criteria, allow custom:


=INDIRECT("'"&VLOOKUP(H5,Suppliers!A:B,2,FALSE)&"' !$a:$A")

all data will be in column A, but different tabs. when i use the above
formulae, i get an error message indicating that i cannot use references
to
other worksheets or workbooks for Data Validation criteria. But if i use
the
formula "=items" it references the list from a different worksheet.

any suggestions to get past this?




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 88
Default if condition with data validation list

doesn't work... as for the referencing a list from another sheet, Excel can
do that.

TAB2, highlight the column A, in the cell next to the formula bar, enter
"test" as the descriptor. enter various data in column A.
in TAB1, select a cell, select DATA Valadation, and the validation criteria
is allow list, and for the source enter "=test", and you can reference the
data in column A, on TAB2...

next option...

can it be written into ThisWorkbook

Sub Macro1()
'
' Macro1 Macro
'
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=LOOKHERE"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub


where LOOKHERE tells what to look for, something like this

lookhere = vlookup(d5,Suppliers!,A:B,2,false)

if i change the selection in D5, the cell that should make the list would
look up somewhere else.

cannot really give a better example...

suggestions?

jat



"Bob Phillips" wrote:

I think that you just need to define a name for Suppliers!A:B, let's say
_suppliers, and use

=INDIRECT("'"&VLOOKUP(H5,_suppliers,2,FALSE)&"'!$A :$A")


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"jatman" wrote in message
...
i would like a list for data validation, but the list could be from
different
tabs.

with validation criteria, allow custom:


=INDIRECT("'"&VLOOKUP(H5,Suppliers!A:B,2,FALSE)&"' !$a:$A")

all data will be in column A, but different tabs. when i use the above
formulae, i get an error message indicating that i cannot use references
to
other worksheets or workbooks for Data Validation criteria. But if i use
the
formula "=items" it references the list from a different worksheet.

any suggestions to get past this?





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default if condition with data validation list


"jatman" wrote in message
...
doesn't work... as for the referencing a list from another sheet, Excel
can
do that.


But only if that list is a defined name!

TAB2, highlight the column A, in the cell next to the formula bar, enter
"test" as the descriptor. enter various data in column A.
in TAB1, select a cell, select DATA Valadation, and the validation
criteria
is allow list, and for the source enter "=test", and you can reference the
data in column A, on TAB2...

next option...

can it be written into ThisWorkbook

Sub Macro1()
'
' Macro1 Macro
'
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=
_
xlBetween, Formula1:="=LOOKHERE"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub


where LOOKHERE tells what to look for, something like this

lookhere = vlookup(d5,Suppliers!,A:B,2,false)

if i change the selection in D5, the cell that should make the list would
look up somewhere else.

cannot really give a better example...

suggestions?


No idea what you are trying to do now, had little to start with, less now.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 88
Default if condition with data validation list

i will post my purchase order on the community templates soon, and will post
back here, it is easier to understand with a working copy of something,
rather than bits and pieces of things.

thanx,

jat


"Bob Phillips" wrote:


"jatman" wrote in message
...
doesn't work... as for the referencing a list from another sheet, Excel
can
do that.


But only if that list is a defined name!

TAB2, highlight the column A, in the cell next to the formula bar, enter
"test" as the descriptor. enter various data in column A.
in TAB1, select a cell, select DATA Valadation, and the validation
criteria
is allow list, and for the source enter "=test", and you can reference the
data in column A, on TAB2...

next option...

can it be written into ThisWorkbook

Sub Macro1()
'
' Macro1 Macro
'
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=
_
xlBetween, Formula1:="=LOOKHERE"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub


where LOOKHERE tells what to look for, something like this

lookhere = vlookup(d5,Suppliers!,A:B,2,false)

if i change the selection in D5, the cell that should make the list would
look up somewhere else.

cannot really give a better example...

suggestions?


No idea what you are trying to do now, had little to start with, less now.



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
data validation list: how do i 'force' a user to enter data from the list? showsomeidnow Excel Discussion (Misc queries) 4 May 1st 07 05:49 PM
data validation list: how do i 'force' a user to enter data from the list? showsomeidnow Excel Discussion (Misc queries) 2 April 29th 07 11:09 PM
data validation invalid in dynamic validation list ilia Excel Discussion (Misc queries) 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Worksheet Functions 0 November 7th 06 12:54 PM
Data Validation - List - keeping the format of the list - shading aasbury Excel Discussion (Misc queries) 1 June 5th 06 04:25 PM


All times are GMT +1. The time now is 03:29 AM.

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"