EXTRACT WHOLE NUM and FRACTIONS: into different columns

itr674

Well-known Member
Joined
Apr 10, 2002
Messages
1,786
Office Version
  1. 2016
Platform
  1. Windows
Need a formula to extract length x width x height from a single column into three columns.
Sample data:
31/2" x 25/8" x 11/4 extract into separate columns as 3 1/2" 2 5/8" 1 1/4"
131/2" x 8" x 63/4" extract into separate columns as 13 1/2" 8" 6 3/4"

The max length of whole number is two (two digits/characters.
Dropping this in from another program but want to separate for netter filterability.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
have you tried the built-in text to columns function (under the data menu) using x as the delimited?
 
Upvote 0
Hi
Any way With formulas
If your data in column A2
Excel Formula:
B2=TRIM(MID(SUBSTITUTE(A2,"x",REPT(" ",99)),1,99))
C2=TRIM(MID(SUBSTITUTE(A2,"x",REPT(" ",99)),99,99))
D3=TRIM(MID(SUBSTITUTE(A2,"x",REPT(" ",99)),2*99,99))
 
Upvote 0
Solution
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also do you need the spaces adding between the whole number & the fraction, or are they already there?
 
Upvote 0
Could you have a measurement like 111/16"?
If so, how would we know if it was 1 11/16" or 11 1/16"?
 
Upvote 0
The fact there is no space was what was messing me up, AlanY's substitute formula worked, so far...

AlanY, thanks for reply, and I did try text-to-columns but to figure out formatting.

mohadin, thanks for reply, and formulas worked great, trying to add space now...

Fluff, thanks for reply, and have updated my account, and a space, or "-", would be good.

Peter_SSs, thanks for reply, and right now I don't see any 111/16, but that could be a problem...
 
Upvote 0
If those first two suggestions work for you that is great.
From your thread title I thought that you wanted the whole numbers in their own columns and the fractions in their own columns like this. ?

22 03 21.xlsm
ABCDEFG
231/2" x 25/8" x 11/431/225/811/4
Sheet2 (5)


In future, you could help clarify that sort of thing by using XL2BB
 
Upvote 0
If those first two suggestions work for you that is great.
From your thread title I thought that you wanted the whole numbers in their own columns and the fractions in their own columns like this. ?

In future, you could help clarify that sort of thing by using XL2BB
Copy, yep my comm was bad, and will use XL2BB next time, if I can remember, I old...
 
Upvote 0
Could still use spaces...

3 1⁄2"2 5⁄8"1 1⁄4"
3 1⁄2"2 5⁄8"2"
 
Upvote 0
How about
+Fluff 1.xlsm
ABCD
1
231/2" x 25/8" x 11/4"3 1/2"2 5/8"1 1/4"
3131/2" x 8" x 63/4"13 1/2"8"6 3/4"
Main
Cell Formulas
RangeFormula
B2:D3B2=IFERROR(REPLACE(TRIM(MID(SUBSTITUTE($A2,"x",REPT(" ",100)),COLUMNS($B2:B2)*100-99,100)),LEN(TRIM(MID(SUBSTITUTE($A2,"x",REPT(" ",100)),COLUMNS($B2:B2)*100-99,100)))-3,0," "),TRIM(MID(SUBSTITUTE($A2,"x",REPT(" ",100)),COLUMNS($B2:B2)*100-99,100)))
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top