ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how to extract digits from a row of numbers (https://www.excelbanter.com/excel-worksheet-functions/201101-how-extract-digits-row-numbers.html)

preydd

how to extract digits from a row of numbers
 
I have these data in a column:
5100-10650 sales
5100-11250 sales

How can I extract only 10650 and 11250 and present it in another column?

Thanks.

pub

how to extract digits from a row of numbers
 
?B?cHJleWRk?= wrote in
:

I have these data in a column:
5100-10650 sales
5100-11250 sales

How can I extract only 10650 and 11250 and present it in another

column?

Thanks.


theres a lot of ways to do this.
is it always a 5 digit number?
this will extract the number

=MID(A1,FIND("-",A1)+1,5)

this will turn it into a number value

=VALUE(MID(A1,FIND("-",A1)+1,5))

if its more than 5 digits, then look for the word sales and work backward

=VALUE(MID(A1,FIND("-",A1)+1,FIND("sales",A1)-7))

hope this helps

RagDyeR

how to extract digits from a row of numbers
 
If the number of characters are *exactly* as your example, try this:

=LEFT(RIGHT(A1,11),5)

OR

=LEFT(RIGHT(TRIM(A1),11),5)
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"preydd" wrote in message
...
I have these data in a column:
5100-10650 sales
5100-11250 sales

How can I extract only 10650 and 11250 and present it in another column?

Thanks.




All times are GMT +1. The time now is 03:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com