I got it to work using Match + Index as described in the article I linked earlier.
Here's what I did, should anyone have the same problem:
- In the products sheet, I create a new column named 'brandID' next to the column 'brand' (with all the regular names)
- Copied the entire 'brand' column over to a new sheet
- Used advanced filtering and filtered for unique results
- Copied those values over to another sheet (named 'brands')
- Added a column to the 'brands' sheet with ID's. (So now 'brands' is a lookup table; it has two columns, first is brand name, second is brand ID)
- Used the following function:
What that function does is described pretty well in the article.
Because I started my ID's at 1, the INDEX function isn't even needed (because MATCH already returns the correct ID (=row number)), but this approach is of course more dynamic should that change.
Thanks for the help
Bookmarks