Task 1 of 5
In D2:D11, find the city: extract the letters at the start of the code (REGEXEXTRACT) and look them up in the reference table I2:J4 (XLOOKUP).
Lesson theory
An export of orders: the order code starts with a city code, and the clients are both companies and private individuals. Build the report using only modern functions:
REGEXEXTRACT+XLOOKUPreturn the city from the order code;REGEXTESTflags a company (the name ends in LLC or Inc);GROUPBYreturns revenue by city;FILTERlists the companies' orders;LETcalculates the share of companies in revenue, with clear names inside the formula.
The company flag is calculated in a helper column: it is computed once, and FILTER and LET just refer to it.
Test yourself
Practice is part of Pro
The live spreadsheet, task checking and .xlsx files in all 170 lessons. Your progress is saved in this browser; sync across devices is coming soon.