Sorry for the confusing title, my problem is this:
I have a table of items, like this:
| A | B | C | |
|---|---|---|---|
| 1 | Number | Name | Category |
| 2 | 100-150-135 | Mike | - |
| 3 | 150-150-133 | Joe | - |
In the same document, I have another sheet that looks like this:
| A | B | |
|---|---|---|
| 1 | Number | Category |
| 2 | 100 | 1 |
| 3 | 150 | 2 |
I want the first table to check the first three characters of a number, look up the corresponding category in the second table and write that category into the third column. So "Mike" should have category 1 and "Joe" should have category 2.
I tried to do it by extracting the first three characters using LEFTB and then using IFS like so:
=IFS((=LEFTB(A:A;3))=Sheet2!A:A ; Sheet2!B:B)
Gives me an error Formula parse error . I tried to do something similar with SWITCH but that didn't work either. I have never worked with Sheets before, so any help would be highly appreciated.