Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • How to use Excel ROWS Function
  • Approximate match with multiple criteria in Excel
  • Two-way lookup with VLOOKUP in Excel
  • Vlookup Examples in Excel
  • Multi-criteria lookup and transpose in Excel

Data Analysis Examples

  • How to calculate current stock or inventory in Excel
  • Reverse List in Excel
  • How To Remove Duplicates In Excel Column Or Row?
  • How To Insert and Customize Sparklines in Excel
  • Get column index in Excel Table

Data Validation Examples

  • Excel Data validation only dates between
  • Excel Data validation whole percentage only
  • How To Create Drop-down List in Excel
  • Excel Data validation unique values only
  • Excel Data validation date in next 30 days

Split dimensions into three parts in Excel

by

To split dimensions that like 100x50x25 into three separate parts, you can use some rather complicated formulas that use LEFT, MID, RIGHT, FIND, LEN, and SUBSTITUTE.

Note: you can also use Flash Fill in Excel 2013 and above, and the “text to columns” feature in older versions of Excel. Both approaches are quite a bit simpler than the formulas described below. However, if you need a dynamic solution, read on…

Worked Example:   Find longest string with criteria in Excel

Formula

=LEFT(B4,FIND("x",B4)-1)

Explanation

 

The 1st dimension

To get the first dimension, we are using this formula in C4:

=LEFT(B4,FIND("x",B4)-1)

This works by extracting text starting at the LEFT. The number of characters is calculated by locating the first “x” in the text using the FIND function, then subtracting 1.

The 2nd dimension

To get the second dimension, we are using this formula in D4:

=MID(B4,FIND("x",B4)+1,FIND("~",SUBSTITUTE(B4,"x","~",2))-(FIND("x",B4)+1))

This formula uses the MID function, which extracts a certain number of characters starting at a certain position in the next. The starting position is calculated with this:

FIND("x",B4)+1

Which simply locates the first “x” and adds 1.

Worked Example:   How to find nth occurrence of character in Excel

The number of characters is calculated using:

FIND("~",SUBSTITUTE(B4,"x","~",2))-(FIND("x",B4)+1)

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.

Worked Example:   Remove last characters from right in a cell in Excel

The 3rd dimension

To get the third dimension, we are using this formula in E4:

=RIGHT(B4,LEN(B4)-FIND("~",SUBSTITUTE(B4,"x","~",2)))

This uses the RIGHT function to extract a specific number of characters, starting from the right. We calculate the number of characters to extract by getting the total length with LEN, then subtracting the location of the 2nd instance of “x”.

Post navigation

Previous Post:

Replace one character with another in Excel

Next Post:

Remove unwanted characters in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • EXACT function: Description, Usage, Syntax, Examples and Explanation
  • How to get last word in a cell in Excel
  • How to find nth occurrence of character in Excel
  • Normalize text by removing punctuations, extra spaces and more in Excel
  • PROPER function: Description, Usage, Syntax, Examples and Explanation
  • Get days, months, and years between dates in Excel
  • Calculate series of dates by workdays in Excel
  • Calculate number of hours between two times in Excel
  • How to join date and text together in Excel
  • Extract time from a date and time in Excel
  • CUMPRINC function: Description, Usage, Syntax, Examples and Explanation
  • ODDLPRICE function: Description, Usage, Syntax, Examples and Explanation
  • ISPMT function: Description, Usage, Syntax, Examples and Explanation
  • AMORDEGRC function: Description, Usage, Syntax, Examples and Explanation
  • ACCRINTM function: Description, Usage, Syntax, Examples and Explanation
Acronyms, Abbreviations, Initialism & What They Stand For
© 2021 xlsoffice. All Rights Reserved | Teal Smiles