Get Isotope Number
I need to extract the numbers from the end of the element string 'Carbon-14'. This is crucial for analyzing isotope data, and manually typing them out for hundreds of elements is time-consuming and error-prone.
=RIGHT(A2,LEN(A2)-FIND("-",A2)) How it works: The `RIGHT` function extracts a specified number of characters from the end of a text string. To make it dynamic for varying isotope numbers, we combine it with `LEN` and `FIND`. `FIND("-",A2)` locates the position of the hyphen. `LEN(A2)` gives the total length of the string. By subtracting the hyphen's position from the total length (`LEN(A2)-FIND("-",A2)`), we get the exact number of characters representing the isotope number that appear after the hyphen. This ensures that whether it's 'Carbon-14' (2 digits) or 'Uranium-235' (3 digits), the correct number is always extracted.
Data Setup
| Element Isotope |
|---|
| Carbon-14 |
| Uranium-235 |
| Hydrogen-1 |
| Oxygen-18 |
Step-by-Step Guide
Identify the column containing your element isotope strings (e.g., 'Element Isotope' in column A).
In an adjacent empty cell (e.g., B2), type the beginning of the formula: `=RIGHT(`.
Select the cell containing the first element string (e.g., A2) to specify the text you want to extract from.
For the `num_chars` argument, you need to dynamically calculate how many characters are after the hyphen. Use `LEN(A2)` to get the total length of the string and `FIND("-",A2)` to find the position of the hyphen.
Subtract the hyphen's position from the total length: `LEN(A2)-FIND("-",A2)`. This gives you the number of characters to extract from the right.
Complete the formula: `=RIGHT(A2,LEN(A2)-FIND("-",A2))` and press Enter.
Drag the fill handle (the small square at the bottom-right of cell B2) down to apply the formula to all other element strings in your list.