How to Split Dimensions by 'X' in Excel Using Formulas

📅 Sep 24, 2026 📝 Sarah Miller

Manually parsing merged dimension strings in Excel is a tedious bottleneck that halts analytical productivity. When reconciling inventory assets to secure standard funding sources, clean physical data is vital. Fortunately, mastering Excel's splitting capabilities grants you immediate, automated clarity over your dataset. This optimization operates under the stipulation that your delimiter remains uniform across entries. For example, converting dimensions like "12x8x4" or "10 x 20" into distinct columns ensures accurate volume calculations. Below, we detail the step-by-step formulas required to execute this transformation seamlessly.

How to Split Dimensions by 'X' in Excel Using Formulas

Excel Formula To Split Dimensions With Letter "X"

In many industries-such as e-commerce, manufacturing, shipping, and construction-product dimensions are frequently logged in a single text string. You have likely encountered data formatted as 10x20, 4 x 8, or 12x8x6. While this format is highly readable for humans, it is notoriously difficult for Excel to process. You cannot easily calculate the volume of a package, sum up total lengths, or sort your inventory by width when these values are trapped inside a single text cell.

To perform any mathematical operations, you must first extract these numbers into individual columns. This comprehensive guide will show you how to split dimensions separated by the letter "x" (or "X") using modern dynamic array formulas, classic Excel functions, and alternative built-in Excel utilities.


Method 1: The Modern Way – Using TEXTSPLIT (Excel 365 & 2021+)

If you are using the modern version of Microsoft 365 or Excel 2021, splitting text is incredibly simple. Excel introduced a dedicated function for this exact purpose: TEXTSPLIT. This function searches for a specific delimiter and automatically "spills" the separated values into adjacent columns.

Case 1: Splitting 2D Dimensions (e.g., "10x20")

To split a simple length and width dimension located in cell A2, use the following formula:

=TEXTSPLIT(A2, "x")

If your data contains spaces around the "x" (like "10 x 20"), or inconsistent casing ("10X20"), you can make the formula more robust by specifying multiple delimiters in an array and wrapping the result in the TRIM function to strip out stray spaces:

=TRIM(TEXTSPLIT(A2, {"x","X"}))

Case 2: Splitting 3D Dimensions (e.g., "12x8x6")

One of the best features of TEXTSPLIT is its scalability. The same formula works seamlessly for three, four, or more dimensions. If your cell contains 12x8x6, entering the formula below in one cell will automatically populate three consecutive horizontal cells with 12, 8, and 6:

=TRIM(TEXTSPLIT(A2, {"x","X"}))

Pro-Tip: Converting Text Outputs to Real Numbers

By default, text manipulation functions like TEXTSPLIT return text strings, not numeric values. If you try to sum or multiply these split values, Excel may return an error or treat them as zero. To force Excel to convert these outputs into numbers, apply a double unary operator (--) to the formula:

=--TRIM(TEXTSPLIT(A2, {"x","X"}))

Method 2: The Classic Formulas (Excel 2019, 2016, and Older)

If you or your colleagues are working on older versions of Excel, you won't have access to TEXTSPLIT. Instead, you must rely on a combination of traditional text functions like LEFT, MID, RIGHT, LEN, and SEARCH.

Splitting 2D Dimensions ("Length x Width")

To extract the dimensions from a cell containing two values (e.g., 15x30 in cell A2), you will need two separate formulas placed in two different columns.

Formula for the First Dimension (Left Value):

This formula finds the position of the character "x", subtracts 1 to exclude the "x" itself, and extracts that many characters from the left side of the text string.

=--TRIM(LEFT(A2, SEARCH("x", A2) - 1))

Formula for the Second Dimension (Right Value):

This formula locates the "x", jumps past it, and extracts the remaining portion of the string using the MID function.

=--TRIM(MID(A2, SEARCH("x", A2) + 1, LEN(A2)))

Note: We use SEARCH instead of FIND because SEARCH is case-insensitive, meaning it will naturally handle both "x" and "X" without throwing an error.

Splitting 3D Dimensions ("Length x Width x Height")

Extracting three dimensions using standard text functions is notoriously complex because you have to locate both the first and second occurrences of the delimiter. To make this process painless, Excel power users rely on a clever trick involving the SUBSTITUTE and REPT functions.

This method replaces every "x" with 100 blank spaces, effectively spacing out the numbers. We then use MID to "slice" the spaced-out string at specific intervals and use TRIM to vacuum up the excess spaces, leaving only the desired number.

Assuming your 3D dimension is in cell A2:

Formula for the First Dimension (Length):

=--TRIM(MID(SUBSTITUTE($A2, "x", REPT(" ", 100)), 1, 100))

Formula for the Second Dimension (Width):

=--TRIM(MID(SUBSTITUTE($A2, "x", REPT(" ", 100)), 101, 100))

Formula for the Third Dimension (Height):

=--TRIM(MID(SUBSTITUTE($A2, "x", REPT(" ", 100)), 201, 100))

If your source data might contain capital "X" characters, wrap the source reference in a LOWER function first to normalize the string:

=--TRIM(MID(SUBSTITUTE(LOWER($A2), "x", REPT(" ", 100)), 101, 100))

Method 3: The Power Query Approach (Best for Large Datasets)

If you are working with thousands of rows of data or importing recurring reports, writing formulas can slow down your workbook. Power Query is Excel's built-in data transformation tool, and it handles splitting dimensions with ease.

  1. Select your dataset or table.
  2. Navigate to the Data tab on the Ribbon and click From Table/Range. This opens the Power Query Editor.
  3. Right-click the column header containing your dimensions.
  4. Choose Split Column > By Delimiter.
  5. In the dropdown menu, select Custom.
  6. Type x (or x with spaces if your data is formatted that way) in the text box.
  7. Under "Split at", select Each occurrence of the delimiter.
  8. Click OK. Power Query will split the column into as many columns as needed and automatically try to detect and convert the columns to a "Decimal Number" or "Whole Number" data type.
  9. Go to the Home tab and click Close & Load to send the clean, split data back into a new Excel worksheet.

Method 4: Flash Fill (The Quick 5-Second Way)

If you only need to split dimensions once and don't require formulas that dynamically update when data changes, Flash Fill is the easiest option.

  1. Insert empty columns to the right of your dimension column to hold the split data.
  2. In the first empty cell next to your first data entry (e.g., B2 next to 12x8x6 in A2), manually type 12.
  3. In the next cell down (B3), start typing the first number of the next row. Excel will likely show a grayed-out preview of the remaining rows.
  4. Press Enter to accept the preview. If the preview does not appear, select cell B2, drag down to highlight your data range, and press Ctrl + E (or go to Data > Flash Fill).
  5. Repeat this process for the second column (Width) and the third column (Height).

Summary: Which Method Should You Use?

Method Best For... Pros Cons
TEXTSPLIT Formula Users on Excel 365 / 2021 who need dynamic, automated updates. Extremely simple; handles 2D, 3D, and variable dimensions in one formula. Not compatible with older Excel versions.
Classic Formulas (MID/SUBSTITUTE) Users on legacy Excel versions (2019 and older) needing dynamic updates. Works on all versions of Excel dating back decades. Formulas are complex, hard to write, and difficult to troubleshoot.
Power Query Large databases, automated imports, and complex data-cleaning pipelines. Extremely powerful; handles messy data; doesn't slow down Excel. Requires a manual "Refresh" when source data changes.
Flash Fill One-off cleanups and quick, manual tasks. No formula knowledge required; takes seconds. Static; will not update if you change the original dimension.

Handling Edge Cases and Errors

In real-world scenarios, product dimension strings are rarely pristine. Here is how to handle common anomalies:

  • Missing Dimensions: If some cells only have "12x8" while others have "12x8x6", the classic 3D formula for the third dimension might return an error. You can wrap your formulas in IFERROR to output a blank cell or a default value (like "N/A" or 0) instead of an error:
    =IFERROR(--TRIM(MID(SUBSTITUTE($A2, "x", REPT(" ", 100)), 201, 100)), "")
  • Non-Breaking Spaces: Sometimes, copy-pasting data from websites introduces non-breaking spaces (ASCII code 160) which standard TRIM cannot remove. Clean your input data using SUBSTITUTE to turn non-breaking spaces into normal spaces:
    =TRIM(TEXTSPLIT(SUBSTITUTE(A2, CHAR(160), " "), {"x","X"}))

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.