How to return figure only without unit

Stevekent

Board Regular
Joined
Jul 24, 2013
Messages
109
Office Version
  1. 365
Platform
  1. Windows
Hi, I have data in cells with unit behind the figure. Example, cells A1 = 10.21 m, A2 = 5.2 m, A3 = 30.14 m2 and A4 = 11.0 m. Now what formula to use so that Cell B1 would return 10.21, B2= 5.2, B3=30.14 and B4=11.0. Please help. Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
if the cells are formatted to include the units, simply change the format to Number with whatever number of decimal places you want. If the units are entered manually then the cells contain strings not numbers. In that case try:

=Left(A1,search(" ",A1)-1)+0
 
Upvote 0
if the cells are formatted to include the units, simply change the format to Number with whatever number of decimal places you want. If the units are entered manually then the cells contain strings not numbers. In that case try:

=Left(A1,search(" ",A1)-1)+0

The formula seems not working Mr. Joe. I can't figure out how to solve it.
 
Upvote 0
Hi, I have data in cells with unit behind the figure. Example, cells A1 = 10.21 m, A2 = 5.2 m, A3 = 30.14 m2 and A4 = 11.0 m. Now what formula to use so that Cell B1 would return 10.21, B2= 5.2, B3=30.14 and B4=11.0. Please help. Thanks

I think below 'workaround' will help..

1. Copy all the contents of column A to B
2. Select column B and press ctrl+f and click the replace tab
3. Find m2, replace all by blank
4. Find m, replace all by blank
5. Find (Space), replace all by blank

HTH
 
Upvote 0
Another workaround

Using text to column feature

1. Copy all the contents of column A to B
2. Select column B and click on data ribbon 'text to columns'
3. Select "Delimited"
4. Check Space or Check other and insert "m"
5. Delete the extracted data in next columns and you have your numbers in Column B

HTH
 
Upvote 0
Is there a way of using formula instead of what have been suggested which incurred more steps.
 
Upvote 0
The formula seems not working Mr. Joe. I can't figure out how to solve it.
Put this in cell A1 in a new worksheet: 10.21 m. Then copy the formula in post#2 directly from your browser and paste it to cell B1. What do you get in B1? I'm assuming that the "m" in your data cells is not the result of custom formatting the cells to append " m" to numbers that are entered in the cells, thus leaving real numbers (not strings) in those cells.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,395
Members
449,446
Latest member
CodeCybear

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