Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,670
Default How to select the numbers?

Does anyone have any suggestions on how to select the numbers within a string?
For example, in cell A1, there is a string 6023 - 10056. I would like to
retrieve any number before "-" in cell B1, it should return 6023, and I would
like to retrieve any number after "-" in cell C1, it should return 10056.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,420
Default How to select the numbers?

=--TRIM(LEFT(A2,FIND("-",A2)-1))

and

=--TRIM(MID(A2,FIND("-",A2)+1,99))

--
__________________________________
HTH

Bob

"Eric" wrote in message
...
Does anyone have any suggestions on how to select the numbers within a
string?
For example, in cell A1, there is a string 6023 - 10056. I would like to
retrieve any number before "-" in cell B1, it should return 6023, and I
would
like to retrieve any number after "-" in cell C1, it should return 10056.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 747
Default How to select the numbers?

try this

Select Col A
Go to | data | text to column | delimited | next |
in other : give hyphen ( - ) | next | Destination | B1 |
Select the second part values i.e, after hyphen values |
Select do not import column(skip) | finish |



On Feb 12, 10:50*am, Eric wrote:
Does anyone have any suggestions on how to select the numbers within a string?
For example, in cell A1, there is a string 6023 - 10056. I would like to
retrieve any number before "-" in cell B1, it should return 6023, and I would
like to retrieve any number after "-" in cell C1, it should return 10056.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric


  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 747
Default How to select the numbers?


Select Col A
Go to | data | text to column | delimited | next |
in Other : give hyphen ( - ) | next | Destination:= B1 | Finish


On Feb 12, 4:03*pm, muddan madhu wrote:
try this

Select Col A
Go to | data | text to column | delimited | next |
in other : give hyphen ( - ) | next | Destination | B1 |
Select the second part values i.e, after hyphen values |
Select do not import column(skip) | finish |

On Feb 12, 10:50*am, Eric wrote:

Does anyone have any suggestions on how to select the numbers within a string?
For example, in cell A1, there is a string 6023 - 10056. I would like to
retrieve any number before "-" in cell B1, it should return 6023, and I would
like to retrieve any number after "-" in cell C1, it should return 10056.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to select the numbers? Eric Excel Discussion (Misc queries) 1 February 12th 09 06:42 AM
Select even or odd numbers HUGO Excel Discussion (Misc queries) 4 December 26th 08 03:26 AM
I CANNOT SELECT NUMBERS ON MY KEYBOARD? Ash New Users to Excel 2 September 5th 08 08:41 PM
auto select of numbers ekkeindoha Excel Discussion (Misc queries) 1 July 7th 07 09:46 AM
How to select top six numbers from a of range of random numbers Jack M Taylor Excel Worksheet Functions 4 January 30th 07 09:18 PM


All times are GMT +1. The time now is 06:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"