Forum Discussion
Creating a level up system with Excel.
To get a level from a list of steps, first create a little table that looks similar to this:
| 0 | Beginner |
| 50 | Intermediate |
| 100 | Pro |
| 200 | Expert |
| 1000 | Guru |
(lets assume this is on Sheet2, range A2:B6).
Now suppose you have a # of points in cell D3, you can fetch the level from the table like so:
=VLOOKUP(D3,Sheet2!$A$2:$B$6,2,TRUE)
Thanks so much Jan. Works like a charm. Don't quite understand how, but it does.
Thanks
- JKPieterseMay 24, 2017Silver Contributor
The VLOOKUP function looks up a value in a list of values.
The last argument of the function is really important. If you set that to TRUE (as in our example) VLOOKUP *only* allows lookups in a (ascending) sorted list and if it does not find an exact match, it returns the item that is the first one less than the value you are looking for. So look for 9 and it will return the item belonging to 0. Look for 999 and it'll return what belongs to 200.
If however you use FALSE as the final argument, VLOOKUP will only return EXACT matches and #N/A! if it does not find a match. Also, the table does not have to be sorted. FALSE is the most used argument, but in your case it is TRUE we needed.