The formula returns all three dimensions to cell D5, and the results spill into the range D5:F5. Note: in older versions of Excel without TEXTSPLIT, you can use more complicated formulas based on several functions. Both approaches are explained below. Also, if you don’t want or need to use a formula, you can use Excel’s Text-to-Columns feature. There are two basic approaches to solving this problem. If you are using Excel 365, the easiest solution is to use the TEXTSPLIT function as shown in the worksheet above. If you are using an older version of Excel without TEXTSPLIT, you can use more complicated formulas based on several functions, including LEFT, RIGHT, LEN, SUBSTITUTE, and FIND. Both approaches are explained below.

### TEXTSPLIT function

The TEXTSPLIT function is a great way to solve this problem, because it is so simple to use. To split dimensions into three parts, using the “x” as a delimiter, the formula in D5, copied down, is: The formula works in two steps. First, TEXTSPLIT splits the text in B5 using the “x”. The result is a horizontal array that contains three elements, one for each dimension: Notice the numbers are still surrounded by space. Our goal is to get actual numeric values, so in the second step, we simply add zero. This is a simple way of getting Excel’s formula engine to coerce a text value to an actual number. The result is an array like this: Notice the double quotes ("") are gone, because the math operation of addition (+) changes the text values to actual numbers. The formula returns this result to cell D5, and the three dimensions spill into the range D5:F5. Note: one nice thing about the “add zero” trick, is that it doesn’t matter if the number is surrounded by space characters or not. The numbers can be separated with " x " or “x” in the original text string with the same result. However, if you are splitting values that are not meant to be numbers, you will want to remove the +0, otherwise the formula will return a #VALUE! error.

### Legacy Excel

In Legacy Excel, we need to use more complicated formulas to accomplish the same thing. To get the first dimension (L), we can use a formula like this in D5: At a high level, this works by extracting text starting from the left side. The number of characters to extract is calculated by locating the first “x” in the text using the FIND function, then subtracting 1: To get the second dimension, we can use a formula like this in cell E5: At a high level, this formula extracts the width (W) with the MID function, which returns a given number of characters starting at a given position in the next. The starting position is calculated with the FIND function like this: FIND simply locates the first “x” and returns the location (4) as a number. Then we add one to start at the first character after “x”: The number of characters to extract, which is provided as num_chars to the MID function, is the most complicated part of the formula: Working from the inside out, we use SUBSTITUTE with FIND to locate the position of the 2nd “x”, as described here. We then subtract from that the location of the first “x” + 1. The main trick here is that we are using the seldom seen instance_num argument in the SUBSTITUTE function to replace only the second instance of the “x” with a tilde (~), so that we can target the second instance of “x” with the FIND function in the next step. Now that we’ve calculated the start_num and num_chars, we can simplify the original MID formula to this: Note we are using the trick of adding zero again to force Excel to coerce the next to a number. Finally, to get the third dimension, we can use a formula like this in cell F5: This formula works a lot like the formula to get the second dimension above. At a high level, we are using the RIGHT function to extract text from the right. The main challenge is to calculate how many characters to extract, num_chars, which is done again with FIND and SUBSTITUTE like this: As above, we use 2 for instance_num argument in the SUBSTITUTE function to replace only the second instance of the “x” with a tilde (~), so that we can target this instance of “x” with the FIND function in the next step: The LEN function returns the total characters in the text string (10) and FIND returns 8 as the location of the second “x”, so num_chars becomes 2 in the end. RIGHT returns the 2 characters from the right side of the text string (which includes a space) we add zero to the result to force Excel to change the next to a number.

### Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.