Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Best method to populate cell based upon drop down list selection

I am trying to populate a cell with text based upon a drop down list
selection. I have tried the following but when tested, results are not always
correct (a toucan is a bird, but a palmino is not a dog) Also, african grey
returns #N/A.

=LOOKUP(G16,{"pointer","collie","poodle","palomino ","thoroughbred","quarter","parakeet","african
grey","toucan"},{"dog","dog","dog","horse","horse" ,"horse","bird","bird","bird"})

What am I missing?

Drop Down List pulls from a source within the worksheet.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,522
Default Best method to populate cell based upon drop down list selection

Important The values in array must be placed in ascending order:
....,-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE; otherwise, LOOKUP may not give
the correct value. Uppercase and lowercase text are equivalent.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Thalarctos" wrote in message
...
I am trying to populate a cell with text based upon a drop down list
selection. I have tried the following but when tested, results are not
always
correct (a toucan is a bird, but a palmino is not a dog) Also, african
grey
returns #N/A.

=LOOKUP(G16,{"pointer","collie","poodle","palomino ","thoroughbred","quarter","parakeet","african
grey","toucan"},{"dog","dog","dog","horse","horse" ,"horse","bird","bird","bird"})

What am I missing?

Drop Down List pulls from a source within the worksheet.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Best method to populate cell based upon drop down list selection

Hi,

They lookup vector has to be sorted

=LOOKUP(A1,{"african
grey","collie","palomino","parakeet","pointer","po odle","quarter","thoroughbread","toucan"},{"Bird", "dog","horse","bird","dog","dog","horse","horse"," bird"})
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Thalarctos" wrote:

I am trying to populate a cell with text based upon a drop down list
selection. I have tried the following but when tested, results are not always
correct (a toucan is a bird, but a palmino is not a dog) Also, african grey
returns #N/A.

=LOOKUP(G16,{"pointer","collie","poodle","palomino ","thoroughbred","quarter","parakeet","african
grey","toucan"},{"dog","dog","dog","horse","horse" ,"horse","bird","bird","bird"})

What am I missing?

Drop Down List pulls from a source within the worksheet.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Best method to populate cell based upon drop down list selection

You have a couple of solutions, but I would do this:

Create a new sheet (name it AnimalTable
Create a table in columns A:B
Column A is the pointer, collie, poodle, ..
Column B is the type of animal

Then I could use:

=vlookup(g16,animaltable!a:b,2,0)

I find that dedicated tables on dedicated worksheets like this are easier to
update.



Thalarctos wrote:

I am trying to populate a cell with text based upon a drop down list
selection. I have tried the following but when tested, results are not always
correct (a toucan is a bird, but a palmino is not a dog) Also, african grey
returns #N/A.

=LOOKUP(G16,{"pointer","collie","poodle","palomino ","thoroughbred","quarter","parakeet","african
grey","toucan"},{"dog","dog","dog","horse","horse" ,"horse","bird","bird","bird"})

What am I missing?

Drop Down List pulls from a source within the worksheet.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Best method to populate cell based upon drop down list selecti

Thank you - I sorted the list for the drop down, but didn't change the order
in the formula.

"Mike H" wrote:

Hi,

They lookup vector has to be sorted

=LOOKUP(A1,{"african
grey","collie","palomino","parakeet","pointer","po odle","quarter","thoroughbread","toucan"},{"Bird", "dog","horse","bird","dog","dog","horse","horse"," bird"})
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Thalarctos" wrote:

I am trying to populate a cell with text based upon a drop down list
selection. I have tried the following but when tested, results are not always
correct (a toucan is a bird, but a palmino is not a dog) Also, african grey
returns #N/A.

=LOOKUP(G16,{"pointer","collie","poodle","palomino ","thoroughbred","quarter","parakeet","african
grey","toucan"},{"dog","dog","dog","horse","horse" ,"horse","bird","bird","bird"})

What am I missing?

Drop Down List pulls from a source within the worksheet.

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
Formula to populate a drop down list based on the selection of ano Mekinnik Excel Discussion (Misc queries) 1 September 27th 07 06:54 PM
How to Auto-populate cell based on selection of a list item AK9955 Excel Discussion (Misc queries) 2 April 30th 07 10:04 AM
auto populate cell based on previous cell drop down list selectio. PuzzledbyLists Excel Discussion (Misc queries) 2 September 11th 06 01:28 AM
Auto populate several cells based on a selection from drop down li Sheldon Excel Discussion (Misc queries) 3 January 13th 06 08:12 PM
need to populate several cells based on drop down menu selection TerriF Excel Discussion (Misc queries) 1 May 18th 05 10:27 PM


All times are GMT +1. The time now is 08:30 PM.

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

About Us

"It's about Microsoft Excel"