1

I am very confused about Lookup.

Let say I have a list of Weapons from Weapon A to Weapon E and their associated win rate. In Table2, Player1 picked Weapon C and I want the column "Weapon Win Rate" to match Table 1 Weapon C win rate which is 30.

I tried to use Lookup, but it only works for value but not text. May I know if there is another function that I can use to look up text?

Table 1.

Weapon Win Rate
A 10
B 20
C 30
D 40
E 50

Table 2.

Player Weapon Weapon Win Rate
Player1 C
Player2 B
Player3 A
Player4 E
Player5 D

Thanks for your help. Kelvin

Harun24hr
  • 30,391
  • 4
  • 21
  • 36
Kelvin
  • 21
  • 2

2 Answers2

0

Use simple VLOOKUP() function like

=VLOOKUP(E2,$A$2:$B$6,2,FALSE)

You can also use index match in this way

=INDEX($B$2:$B$6,MATCH(E2,$A$2:$A$6,0))

With Microsoft Excel 365 you can use below formulas

=XLOOKUP(E2,$A$2:$A$6,$B$2:$B$6)    
=@FILTER($B$2:$B$6,$A$2:$A$6=E2)

enter image description here

Harun24hr
  • 30,391
  • 4
  • 21
  • 36
  • Thanks for your help. May I know why I need to type FALSE at the end in order to get this work? – Kelvin Sep 08 '21 at 04:25
0

VLOOKUP will treat you better, it is more powerful as well and not to hard to learn.

Link to reference article

The parameters are: VLOOKUP(Lookup_Value, Table_array, Col_index, num, Range_lookup)

  • Lookup_value: usually refer to another cell, for you it would be the weapon column of your 2nd table
  • Table_array: the table to find the data, for you, select the 1st table. Best to use F4 on the values to lock them in on this one so they don't change when you apply the formula to other cells.
  • Col_index: which column to pull the data from, for you this would be column 2
  • Range_lookup: Best to use false on this. From the reference article:

If range_lookup is TRUE or left out, the first column needs to be sorted alphabetically or numerically. If the first column isn't sorted, the return value might be something you don't expect. Either sort the first column, or use FALSE for an exact match.

Derrick
  • 75
  • 7