We're already familiar with the VLOOKUP function, often used to solve lookup tasks. Until now, we've only applied it for exact matches. Let's explore how it can help us with other types of problems as well!
Our table keeps records of a company's employees. We can see their names, employee IDs, departments, the exact date they started working at the company, and based on this, how many years they've been employed there. The values in column E represent full years only; partial years are not counted in the employment duration. We'd like to classify employees into appropriate categories based on the length of their employment. These categories are shown in the small helper table.
We need to examine the values in column E. If a number falls between 0 and 5, it belongs to category A; if between 6 and 10, then category B; if between 11 and 15, category C; and if it's 16 or above, category D. While this could be solved using several nested IF functions, there's a simpler and shorter solution—the VLOOKUP function!
