Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Data Validation on Vlookup

How do I get a selection via a vlookup formula? I have several columns of
data with data validation. In the first column is the choice Rigid, Prime
Mover or Tanker. In another column, the choices are for Rigid choice 1 and 2,
for Prime Mover the choices need to be 1, 2, 3, 4 and for Tanker the only
choice is to be Not Applicable. If I select Rigid, I don't want to see the
options for Prime Mover or Tanker. I have created a table of data like so:

Prime Mover 1
Prime Mover 2
Prime Mover 3
Prime Mover 4
Rigid 1
Rigid 2
Tanker Not applicable

The numbers are only for ease of demonstration, the data is actually text.
Is it possible to look up Prime Mover (via vlookup) to then determine which
choices should be made available. I have read Debra Dagleish's document on
data validation but it doesn't state this situation very clearly. Any help
appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Data Validation on Vlookup

Don't know which section of Debra's site you read but for dependent lists see
this site.

http://www.contextures.on.ca/xlDataVal13.html

Explains it quite clearly IMO

You may have to adjust your data layout to achieve your ends.


Gord Dibben MS Excel MVP

On Mon, 12 Nov 2007 16:21:00 -0800, markmcd
wrote:

How do I get a selection via a vlookup formula? I have several columns of
data with data validation. In the first column is the choice Rigid, Prime
Mover or Tanker. In another column, the choices are for Rigid choice 1 and 2,
for Prime Mover the choices need to be 1, 2, 3, 4 and for Tanker the only
choice is to be Not Applicable. If I select Rigid, I don't want to see the
options for Prime Mover or Tanker. I have created a table of data like so:

Prime Mover 1
Prime Mover 2
Prime Mover 3
Prime Mover 4
Rigid 1
Rigid 2
Tanker Not applicable

The numbers are only for ease of demonstration, the data is actually text.
Is it possible to look up Prime Mover (via vlookup) to then determine which
choices should be made available. I have read Debra Dagleish's document on
data validation but it doesn't state this situation very clearly. Any help
appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 367
Default Data Validation on Vlookup

On Nov 13, 9:21 am, markmcd wrote:
How do I get a selection via a vlookup formula? I have several columns of
data with data validation. In the first column is the choice Rigid, Prime
Mover or Tanker. In another column, the choices are for Rigid choice 1 and 2,
for Prime Mover the choices need to be 1, 2, 3, 4 and for Tanker the only
choice is to be Not Applicable. If I select Rigid, I don't want to see the
options for Prime Mover or Tanker. I have created a table of data like so:

Prime Mover 1
Prime Mover 2
Prime Mover 3
Prime Mover 4
Rigid 1
Rigid 2
Tanker Not applicable

The numbers are only for ease of demonstration, the data is actually text.
Is it possible to look up Prime Mover (via vlookup) to then determine which
choices should be made available. I have read Debra Dagleish's document on
data validation but it doesn't state this situation very clearly. Any help
appreciated.


I have a solution for you, but there are maybe better solutions out
there.

you have to spare 3 columns, let's say colums "IT" "IU" and "IV"
In column A you have your choices "Prime Mover", "Rigid" and "Tanker"
in Column B you want to select according to your choices in A
In Column "IT" you put following formula: =IF(A1="",6,IF(A1="Tanker",
5,1))
In Column "IU" following: =IF(A1="Prime Mover",2,IF(A1="Rigid",
4,IF(A1="Tanker",5,6)))
copy those formulas down.
Now in column "IV" you enter those values:
IV1 = 1
IV2 = 2
IV3 = 3
IV4 = 4
IV5 = not applicable

now the data validation formula in Column "B" should look like this:
=INDIRECT("IV" & IT1 & ":IV" & IU1)

Hope that is clear, but as I told you before, i believe that there are
better solutions
out there. But It works, and maybe you can use it.

Carlo

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Data Validation on Vlookup


Hi Carlo,

Thanks for this. It works. Extending on this idea I have another list
whereby if the selection in column A is Prime Mover then options should be
50, 70, 110, 130, or "by Supplier"
For the rigid, the options should be 10,20,45 or 50. For tanker the only
option should be Not applicable. So the overall list should be
10
20
45
50
70
110
130
By Supplier
Not applicable

From your previous example, everything worked well but the ranges all began
from the top row. Here the ranges are different. ie Semi should only address
50 and upwards but Rigid only up to 50. I'm able to get it to work but under
Rigid the choices are 10,20,45,50 which is fine but the Semi also starts from
10 when it should be 50 all the way to the end of the list excepting Not
Applicable which only applies to Tanker.

Any ideas much appreciated.
"carlo" wrote:

On Nov 13, 9:21 am, markmcd wrote:
How do I get a selection via a vlookup formula? I have several columns of
data with data validation. In the first column is the choice Rigid, Prime
Mover or Tanker. In another column, the choices are for Rigid choice 1 and 2,
for Prime Mover the choices need to be 1, 2, 3, 4 and for Tanker the only
choice is to be Not Applicable. If I select Rigid, I don't want to see the
options for Prime Mover or Tanker. I have created a table of data like so:

Prime Mover 1
Prime Mover 2
Prime Mover 3
Prime Mover 4
Rigid 1
Rigid 2
Tanker Not applicable

The numbers are only for ease of demonstration, the data is actually text.
Is it possible to look up Prime Mover (via vlookup) to then determine which
choices should be made available. I have read Debra Dagleish's document on
data validation but it doesn't state this situation very clearly. Any help
appreciated.


I have a solution for you, but there are maybe better solutions out
there.

you have to spare 3 columns, let's say colums "IT" "IU" and "IV"
In column A you have your choices "Prime Mover", "Rigid" and "Tanker"
in Column B you want to select according to your choices in A
In Column "IT" you put following formula: =IF(A1="",6,IF(A1="Tanker",
5,1))
In Column "IU" following: =IF(A1="Prime Mover",2,IF(A1="Rigid",
4,IF(A1="Tanker",5,6)))
copy those formulas down.
Now in column "IV" you enter those values:
IV1 = 1
IV2 = 2
IV3 = 3
IV4 = 4
IV5 = not applicable

now the data validation formula in Column "B" should look like this:
=INDIRECT("IV" & IT1 & ":IV" & IU1)

Hope that is clear, but as I told you before, i believe that there are
better solutions
out there. But It works, and maybe you can use it.

Carlo


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 367
Default Data Validation on Vlookup

On Nov 13, 12:53 pm, markmcd
wrote:
Hi Carlo,

Thanks for this. It works. Extending on this idea I have another list
whereby if the selection in column A is Prime Mover then options should be
50, 70, 110, 130, or "by Supplier"
For the rigid, the options should be 10,20,45 or 50. For tanker the only
option should be Not applicable. So the overall list should be
10
20
45
50
70
110
130
By Supplier
Not applicable

From your previous example, everything worked well but the ranges all began
from the top row. Here the ranges are different. ie Semi should only address
50 and upwards but Rigid only up to 50. I'm able to get it to work but under
Rigid the choices are 10,20,45,50 which is fine but the Semi also starts from
10 when it should be 50 all the way to the end of the list excepting Not
Applicable which only applies to Tanker.

Any ideas much appreciated.



"carlo" wrote:
On Nov 13, 9:21 am, markmcd wrote:
How do I get a selection via a vlookup formula? I have several columns of
data with data validation. In the first column is the choice Rigid, Prime
Mover or Tanker. In another column, the choices are for Rigid choice 1 and 2,
for Prime Mover the choices need to be 1, 2, 3, 4 and for Tanker the only
choice is to be Not Applicable. If I select Rigid, I don't want to see the
options for Prime Mover or Tanker. I have created a table of data like so:


Prime Mover 1
Prime Mover 2
Prime Mover 3
Prime Mover 4
Rigid 1
Rigid 2
Tanker Not applicable


The numbers are only for ease of demonstration, the data is actually text.
Is it possible to look up Prime Mover (via vlookup) to then determine which
choices should be made available. I have read Debra Dagleish's document on
data validation but it doesn't state this situation very clearly. Any help
appreciated.


I have a solution for you, but there are maybe better solutions out
there.


you have to spare 3 columns, let's say colums "IT" "IU" and "IV"
In column A you have your choices "Prime Mover", "Rigid" and "Tanker"
in Column B you want to select according to your choices in A
In Column "IT" you put following formula: =IF(A1="",6,IF(A1="Tanker",
5,1))
In Column "IU" following: =IF(A1="Prime Mover",2,IF(A1="Rigid",
4,IF(A1="Tanker",5,6)))
copy those formulas down.
Now in column "IV" you enter those values:
IV1 = 1
IV2 = 2
IV3 = 3
IV4 = 4
IV5 = not applicable


now the data validation formula in Column "B" should look like this:
=INDIRECT("IV" & IT1 & ":IV" & IU1)


Hope that is clear, but as I told you before, i believe that there are
better solutions
out there. But It works, and maybe you can use it.


Carlo- Hide quoted text -


- Show quoted text -


Hi

ok, in that case you need to change the Formula in "IT".
Let's say your Values start in IV1 in the following order:
10
20
45
50
70
110
130
By Supplier
Not applicable

then you should following formula in "IT"
=IF(A1="Prime Mover",4,IF(A1="Rigid",1,IF(A1="Tanker",9,10)))
and in "IU"
=IF(A1="Prime Mover",8,IF(A1="Rigid",1,IF(A1="Tanker",9,10)))

just so that you can make your own adjustments:
"IT" tells you the start cell, "IU" the end cell.
In my first post I had a different formula for "IT" because it was an
easier case. Now that the case changed, I took the same formula
like in "IU".
The true-value of the IFs is always the start- or endcell to the
according
Value. The last else is an empty row, so you don't get any errors.

hth

Carlo



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Data Validation on Vlookup

Thanks Carlo...this has done the job. I'll study this a little further so I
can get my head around what's going on here.

"carlo" wrote:

On Nov 13, 12:53 pm, markmcd
wrote:
Hi Carlo,

Thanks for this. It works. Extending on this idea I have another list
whereby if the selection in column A is Prime Mover then options should be
50, 70, 110, 130, or "by Supplier"
For the rigid, the options should be 10,20,45 or 50. For tanker the only
option should be Not applicable. So the overall list should be
10
20
45
50
70
110
130
By Supplier
Not applicable

From your previous example, everything worked well but the ranges all began
from the top row. Here the ranges are different. ie Semi should only address
50 and upwards but Rigid only up to 50. I'm able to get it to work but under
Rigid the choices are 10,20,45,50 which is fine but the Semi also starts from
10 when it should be 50 all the way to the end of the list excepting Not
Applicable which only applies to Tanker.

Any ideas much appreciated.



"carlo" wrote:
On Nov 13, 9:21 am, markmcd wrote:
How do I get a selection via a vlookup formula? I have several columns of
data with data validation. In the first column is the choice Rigid, Prime
Mover or Tanker. In another column, the choices are for Rigid choice 1 and 2,
for Prime Mover the choices need to be 1, 2, 3, 4 and for Tanker the only
choice is to be Not Applicable. If I select Rigid, I don't want to see the
options for Prime Mover or Tanker. I have created a table of data like so:


Prime Mover 1
Prime Mover 2
Prime Mover 3
Prime Mover 4
Rigid 1
Rigid 2
Tanker Not applicable


The numbers are only for ease of demonstration, the data is actually text.
Is it possible to look up Prime Mover (via vlookup) to then determine which
choices should be made available. I have read Debra Dagleish's document on
data validation but it doesn't state this situation very clearly. Any help
appreciated.


I have a solution for you, but there are maybe better solutions out
there.


you have to spare 3 columns, let's say colums "IT" "IU" and "IV"
In column A you have your choices "Prime Mover", "Rigid" and "Tanker"
in Column B you want to select according to your choices in A
In Column "IT" you put following formula: =IF(A1="",6,IF(A1="Tanker",
5,1))
In Column "IU" following: =IF(A1="Prime Mover",2,IF(A1="Rigid",
4,IF(A1="Tanker",5,6)))
copy those formulas down.
Now in column "IV" you enter those values:
IV1 = 1
IV2 = 2
IV3 = 3
IV4 = 4
IV5 = not applicable


now the data validation formula in Column "B" should look like this:
=INDIRECT("IV" & IT1 & ":IV" & IU1)


Hope that is clear, but as I told you before, i believe that there are
better solutions
out there. But It works, and maybe you can use it.


Carlo- Hide quoted text -


- Show quoted text -


Hi

ok, in that case you need to change the Formula in "IT".
Let's say your Values start in IV1 in the following order:
10
20
45
50
70
110
130
By Supplier
Not applicable

then you should following formula in "IT"
=IF(A1="Prime Mover",4,IF(A1="Rigid",1,IF(A1="Tanker",9,10)))
and in "IU"
=IF(A1="Prime Mover",8,IF(A1="Rigid",1,IF(A1="Tanker",9,10)))

just so that you can make your own adjustments:
"IT" tells you the start cell, "IU" the end cell.
In my first post I had a different formula for "IT" because it was an
easier case. Now that the case changed, I took the same formula
like in "IU".
The true-value of the IFs is always the start- or endcell to the
according
Value. The last else is an empty row, so you don't get any errors.

hth

Carlo


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 367
Default Data Validation on Vlookup

You're welcome.
If you have any questions, just post them here!

Carlo

On Nov 13, 2:06 pm, markmcd wrote:
Thanks Carlo...this has done the job. I'll study this a little further so I
can get my head around what's going on here.



"carlo" wrote:
On Nov 13, 12:53 pm, markmcd
wrote:
Hi Carlo,


Thanks for this. It works. Extending on this idea I have another list
whereby if the selection in column A is Prime Mover then options should be
50, 70, 110, 130, or "by Supplier"
For the rigid, the options should be 10,20,45 or 50. For tanker the only
option should be Not applicable. So the overall list should be
10
20
45
50
70
110
130
By Supplier
Not applicable


From your previous example, everything worked well but the ranges all began
from the top row. Here the ranges are different. ie Semi should only address
50 and upwards but Rigid only up to 50. I'm able to get it to work but under
Rigid the choices are 10,20,45,50 which is fine but the Semi also starts from
10 when it should be 50 all the way to the end of the list excepting Not
Applicable which only applies to Tanker.


Any ideas much appreciated.


"carlo" wrote:
On Nov 13, 9:21 am, markmcd wrote:
How do I get a selection via a vlookup formula? I have several columns of
data with data validation. In the first column is the choice Rigid, Prime
Mover or Tanker. In another column, the choices are for Rigid choice 1 and 2,
for Prime Mover the choices need to be 1, 2, 3, 4 and for Tanker the only
choice is to be Not Applicable. If I select Rigid, I don't want to see the
options for Prime Mover or Tanker. I have created a table of data like so:


Prime Mover 1
Prime Mover 2
Prime Mover 3
Prime Mover 4
Rigid 1
Rigid 2
Tanker Not applicable


The numbers are only for ease of demonstration, the data is actually text.
Is it possible to look up Prime Mover (via vlookup) to then determine which
choices should be made available. I have read Debra Dagleish's document on
data validation but it doesn't state this situation very clearly. Any help
appreciated.


I have a solution for you, but there are maybe better solutions out
there.


you have to spare 3 columns, let's say colums "IT" "IU" and "IV"
In column A you have your choices "Prime Mover", "Rigid" and "Tanker"
in Column B you want to select according to your choices in A
In Column "IT" you put following formula: =IF(A1="",6,IF(A1="Tanker",
5,1))
In Column "IU" following: =IF(A1="Prime Mover",2,IF(A1="Rigid",
4,IF(A1="Tanker",5,6)))
copy those formulas down.
Now in column "IV" you enter those values:
IV1 = 1
IV2 = 2
IV3 = 3
IV4 = 4
IV5 = not applicable


now the data validation formula in Column "B" should look like this:
=INDIRECT("IV" & IT1 & ":IV" & IU1)


Hope that is clear, but as I told you before, i believe that there are
better solutions
out there. But It works, and maybe you can use it.


Carlo- Hide quoted text -


- Show quoted text -


Hi


ok, in that case you need to change the Formula in "IT".
Let's say your Values start in IV1 in the following order:
10
20
45
50
70
110
130
By Supplier
Not applicable


then you should following formula in "IT"
=IF(A1="Prime Mover",4,IF(A1="Rigid",1,IF(A1="Tanker",9,10)))
and in "IU"
=IF(A1="Prime Mover",8,IF(A1="Rigid",1,IF(A1="Tanker",9,10)))


just so that you can make your own adjustments:
"IT" tells you the start cell, "IU" the end cell.
In my first post I had a different formula for "IT" because it was an
easier case. Now that the case changed, I took the same formula
like in "IU".
The true-value of the IFs is always the start- or endcell to the
according
Value. The last else is an empty row, so you don't get any errors.


hth


Carlo- Hide quoted text -


- Show quoted text -



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
IF, VLOOKUP & DATA VALIDATION TOGETHER Tbram Excel Worksheet Functions 2 May 21st 07 07:07 PM
Vlookup for data comparison/validation? Linda1949 Excel Worksheet Functions 2 January 9th 07 03:16 AM
Question about using VLOOKUP with Data validation ralphdevlin via OfficeKB.com Excel Worksheet Functions 1 October 12th 06 04:39 AM
How to use both Vlookup & data validation shital shah Excel Worksheet Functions 1 August 4th 06 08:28 PM
data validation using vlookup cbra Excel Worksheet Functions 5 October 26th 05 12:24 PM


All times are GMT +1. The time now is 04:04 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"