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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
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
1ID2412:CADID2412CAD

<colgroup><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B1=LEFT(A1,FIND(":",A1)-1)
C1=RIGHT(A1,LEN(A1)-FIND(":",A1))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
Or, for C1, possibly this...

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

Forum statistics

Threads
1,214,605
Messages
6,120,473
Members
448,967
Latest member
visheshkotha

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