Extract Unit of Measure
As a Physics Teacher, I often have data where numerical values and their units are combined in a single cell (e.g., '100kg', '25cm'). I need a way to extract just the unit of measure, which often consists of the last two characters, to analyze or sort my data more effectively. Specifically, I need to get the last 2 characters of the value '100kg' to separate the unit.
=RIGHT(A2,2) How it works: The RIGHT function extracts a specified number of characters from the end (right side) of a text string. In this formula, `A2` refers to the cell containing the combined value ('100kg'), and `2` specifies that you want to extract the last two characters from that string, effectively isolating the unit of measure.
Data Setup
| Measurement |
|---|
| 100kg |
| 50m |
| 25cm |
| 120g |
Step-by-Step Guide
Select the cell where you want the extracted unit to appear (e.g., B2).
Type the formula: `=RIGHT(A2,2)`
Press Enter.
The unit 'kg' will appear in cell B2.
Drag the fill handle (the small square at the bottom-right of cell B2) down to apply the formula to other cells in your dataset.