Changing number & text to just number

ArPharazon

Board Regular
Joined
May 3, 2004
Messages
51
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
I have a spreadsheet with a column containing number & text (see image).

Any way to convert to just the number, or truncate it to the first 1 or 2 characters?

The column isn't locked, I can convert another column from one date format to another.

eyri_aad_u9a07.jpg
 

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.
I have a spreadsheet with a column containing number & text (see image).

Any way to convert to just the number, or truncate it to the first 1 or 2 characters?

The column isn't locked, I can convert another column from one date format to another.

eyri_aad_u9a07.jpg
Your image is not showing, rather, there is a message from "imageframe" saying the bandwith has been exceeded. Can't you just type in some before and after examples for us?
 
Upvote 0
Stupid imageframe.

There's several different things in a given cell: "1 pallet", "2 pallets", "1 crate", "1 unit", etc.

I'd like to keep the number and get rid of the text if possible.

Thank you for the reply.
 
Upvote 0
There's several different things in a given cell: "1 pallet", "2 pallets", "1 crate", "1 unit", etc.

I'd like to keep the number and get rid of the text if possible.
If those examples are truly representative of what all your data will look like, then this simple formula should work for you...

=LEFT(A1,FIND(" ",A1)-1)
 
Upvote 0
If those examples are truly representative of what all your data will look like, then this simple formula should work for you...

=LEFT(A1,FIND(" ",A1)-1)

I'll be back to work on Monday & give that a shot then.

Thanks for the reply, I'll let you know what happens.
 
Upvote 0
I have similar problem, but I'd also like to keep second part.
For example in this record
ID2412:CAD
I'd have ID2412 in one field and CAD in the other (ignoring colon). Any simple formula to do that?
 
Upvote 0
You can try doing =LEFT(A1,FIND(":",A1)-1) in let's say B1 and then =SUBSTITUTE(A1,B1&":",) in C1.
 
Upvote 0
Cant89,

How about this?


Excel 2007
ABC
1ID2412:CADID2412CAD
Sheet1
Cell Formulas
RangeFormula
B1=LEFT(A1,FIND(":",A1)-1)
C1=RIGHT(A1,LEN(A1)-FIND(":",A1))
 
Upvote 0
How about this?

Excel 2007
ABC
ID2412:CADID2412CAD

<colgroup><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #E0E0F0"]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: #E0E0F0"]B1[/TH]
[TD="align: left"]=LEFT(A1,FIND(":",A1)-1)[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: #E0E0F0"]C1[/TH]
[TD="align: left"]=RIGHT(A1,LEN(A1)-FIND(":",A1))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
Or, for C1, possibly this...

=MID(A1,FIND(":",A1)+1,99)
 
Upvote 0

Forum statistics

Threads
1,222,095
Messages
6,163,900
Members
451,865
Latest member
dunworthc

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