0

Let's say I had a list of numbers.


Code

25

37

46

28

37

28


(can't post pictures so imagine that in a table)

25 = Cow

37 = Sheep

46 = Pig

28 = Chicken

I need a code I can put in the box next to it and drag down so that the correct animal appears next to the correct number.

I can't use the =if function because there's more than 7 values it could be (around 20)

I also can't just do find replace because it's going to have my entries added to it continuously.

Please help

.

The actual list is about 1000 entries with different values but this is for explanation.

thumbtackthief
  • 6,093
  • 10
  • 41
  • 87
Nirty
  • 3
  • 1
  • Very little, i dont know alot about excel so i dont know alot to try, the =if isnt complex enough and i dont understand =vlookup – Nirty Jan 28 '14 at 15:17

1 Answers1

0

You can use VLOOKUP:

=VLOOKUP(A1, $C$1:$D$7, 2, 0)

where $C$1:$D$7 is address of you table with codes and animals, and A1 contains code

Dmitry Pavliv
  • 35,333
  • 13
  • 79
  • 80
  • This hasnt helped, mainly because i dont understand what you said sorry @simoco – Nirty Jan 28 '14 at 15:10
  • Ok, here is [test workbook](https://www.dropbox.com/s/alw59382w2lqs26/simoco.xlsx). Try it. – Dmitry Pavliv Jan 28 '14 at 15:17
  • 1
    Thank you i figured it out using your code, i didnt understand what you metn when first reading it =VLOOKUP(D7,$H$7:$I$10,2,FALSE) to clarify D7=the cell in the code collem. $H$7:$I$10= the table of content for what code = what animal. Still dont understand the 2. FALSE = looks for an exact match. – Nirty Jan 28 '14 at 15:26
  • 1
    2 is the column you want to return - `VLOOKUP(A1, $C$1:$D$7, 2, 0)` is asking excel to find A1 in the first column of the table C1:D7, and once found, return the data that's found in column 2 of that row. – SeanC Jan 28 '14 at 16:51