Need help extracting numbers from a text string

Clinto

New Member
Joined
Jan 10, 2013
Messages
9
I have been humbled (once again) by Excel! I am running tests on prototypes of a new fitness device. As part of our tests, we collect data from an accelerometer. I receive the data in this format: {X,Y,Z}. I can transfer the data from our test fixture to an Excel file. (I have an example in an Excel file, but I couldn't see how to attach it to this post.)


The accelerometer data are in column D. I want to extract the X, Y and Z values and put them in columns E, F and G. I tried using the MID function to extract the data, but that didn't work because the length of the data varies. For example, it could be a single-digit number (such as 5). Or it could be a two-digit number (such as 17 or -8). It could be a three-digit number (such as -21). In rare cases, it could be a three-digit positive number (such as 126) or a four-digit negative number (such as -208).


With thanks in advance, does anybody have any suggestions for extracting the values of X, Y and Z and placing them in separate columns?


Cheers,
Clint
 
Re: SOLVED: Need help extracting numbers from a text string

Try this with less functions. Enter into E1 then drag it down and right:

=1*SUBSTITUTE(MID(SUBSTITUTE($D1,"/",REPT(" ",99)),2+(COLUMN(A1)-1)*99,99),"}","")
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,223,888
Messages
6,175,215
Members
452,618
Latest member
Tam84

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