Array Functions
Intermediate

TEXTSPLIT on a comma and a space

A delimiter can be more than one character, so no stray spaces are left behind.

Task:

Locations were exported as "City, Country". In B2:B5 split each so the city and country land in B and C, with no leading space on the country.

Interactive Spreadsheet

Hints

+5 XPno-hints bonus

Solve it on your own to keep the bonus. Each hint gets one step closer to the formula.

The data in this exercise

This is the grid you start with. Cell references in the task — B6, C2 — point at the row numbers and column letters below.

5 rows × 3 columns8 cells you fill in
ABC
1LocationCityCountry
2Lisbon, Portugal
3Ghent, Belgium
4Kraków, Poland
5Porto, Portugal
What this exercise teachesMay contain the answer

A stray leading space makes " Portugal" and "Portugal" different values, so lookups and counts quietly fail later. Splitting on the exact separator — comma and space — means there is nothing to TRIM afterwards.