Best method to populate cell based upon drop down list selection

T

Thalarctos

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.
 
D

Don Guillett

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.
 
M

Mike H

Hi,

They lookup vector has to be sorted

=LOOKUP(A1,{"african
grey","collie","palomino","parakeet","pointer","poodle","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.
 
D

Dave Peterson

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.
 
T

Thalarctos

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top