Changing number & text to just number

ArPharazon

New Member
Joined
May 3, 2004
Messages
45
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

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
38,150
Office Version
  1. 2019
  2. 2010
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
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

ArPharazon

New Member
Joined
May 3, 2004
Messages
45
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
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

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
38,150
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
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

ArPharazon

New Member
Joined
May 3, 2004
Messages
45
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
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

Cant89

New Member
Joined
Sep 13, 2014
Messages
1
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

mretyk

New Member
Joined
May 6, 2014
Messages
4
You can try doing =LEFT(A1,FIND(":",A1)-1) in let's say B1 and then =SUBSTITUTE(A1,B1&":",) in C1.
 
Upvote 0

hiker95

Well-known Member
Joined
Apr 8, 2009
Messages
17,649
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

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
38,150
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
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,191,286
Messages
5,985,749
Members
439,979
Latest member
alekun86

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
Top