Extract Country Code
I need to extract the first 2 letters of the ISO code to label the map regions.
=LEFT(A2,2) How it works: The LEFT function extracts a specified number of characters from the beginning (left side) of a text string. In this formula, `A2` refers to the cell containing the full ISO code (e.g., 'US-CA-LA'), and `2` specifies that we want to extract the first two characters from the left. This effectively isolates the two-letter country code for map labeling.
Data Setup
| ISO_Code |
|---|
| US-CA-LA |
| GB-ENG-LDN |
| FR-IDF-PAR |
| DE-BY-MUN |
| JP-KTO-OSK |
Step-by-Step Guide
In cell B2 (or your desired output cell), type the formula: `=LEFT(A2,2)`
Press Enter to see the extracted country code (e.g., 'US').
Click on cell B2 again, then drag the fill handle (the small green square at the bottom-right corner of the cell) down to apply the formula to the rest of your ISO codes in column A.