Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top