Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mia Mia is offline
external usenet poster
 
Posts: 101
Default Pick numbers

Hi,

If I have a string of numbers, for example 51900125 and I want to pick
number three (in this example 9) in a specified cell, what shall i type.
I have tried Left and right but then I got a string of figures.
Do anuone know how to solve this?


--
Best regards
Mia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Pick numbers

You'd use MID.

=MID("51900125",3,1)

Is that what you're looking for?
--
HTH,

Barb Reinhardt



"Mia" wrote:

Hi,

If I have a string of numbers, for example 51900125 and I want to pick
number three (in this example 9) in a specified cell, what shall i type.
I have tried Left and right but then I got a string of figures.
Do anuone know how to solve this?


--
Best regards
Mia

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Pick numbers

=mid(c7,3,1)
enters the third character from the string in c7.

best regards

Gabor Sebo

-------------------------------------------
"Mia" wrote in message
...
Hi,

If I have a string of numbers, for example 51900125 and I want to pick
number three (in this example 9) in a specified cell, what shall i type.
I have tried Left and right but then I got a string of figures.
Do anuone know how to solve this?


--
Best regards
Mia


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Pick numbers

As others have mentioned, you would use the MID function. This function can
retrieve one or more characters from a text string. The function's first
argument is the text you want to extract characters from, its second
argument is the position number within the string that you want to start
extracting characters from and its third argument is the total number of
characters to extract. So, assuming cell A1 contained your 51900125 piece of
text, you would use this formula to extract the single character at position
3 in the text...

=MID(A1,3,1)

If you had wanted to pull the four characters out of the text string
starting at position 3 (that is, the numbers 9001), you would use this
formula...

=MID(A1,3,4)

That should give you enough information to see how to use the function in
the future. Interestingly enough, you could have done what you originally
asked for using only the RIGHT and LEFT functions that you wrote that you
had tried; consider this formula to retrieve the 3rd character (the 9 in the
text 51900125)...

=RIGHT(LEFT(A1,3))

Of course, you should always use the MID function to pull characters from
within the middle of a text string and not the above combination formula
(one function call is more efficient than two function calls)... I only
showed it to you as an interesting side comment.

--
Rick (MVP - Excel)



"Mia" wrote in message
...
Hi,

If I have a string of numbers, for example 51900125 and I want to pick
number three (in this example 9) in a specified cell, what shall i type.
I have tried Left and right but then I got a string of figures.
Do anuone know how to solve this?


--
Best regards
Mia


  #5   Report Post  
Posted to microsoft.public.excel.programming
Mia Mia is offline
external usenet poster
 
Posts: 101
Default Pick numbers

Thank you!

--
Best regards
Mia


"Mia" skrev:

Hi,

If I have a string of numbers, for example 51900125 and I want to pick
number three (in this example 9) in a specified cell, what shall i type.
I have tried Left and right but then I got a string of figures.
Do anuone know how to solve this?


--
Best regards
Mia



  #6   Report Post  
Posted to microsoft.public.excel.programming
Mia Mia is offline
external usenet poster
 
Posts: 101
Default Pick numbers

Thank you!

--
Best regards
Mia


"helene and gabor" skrev:

=mid(c7,3,1)
enters the third character from the string in c7.

best regards

Gabor Sebo

-------------------------------------------
"Mia" wrote in message
...
Hi,

If I have a string of numbers, for example 51900125 and I want to pick
number three (in this example 9) in a specified cell, what shall i type.
I have tried Left and right but then I got a string of figures.
Do anuone know how to solve this?


--
Best regards
Mia


  #7   Report Post  
Posted to microsoft.public.excel.programming
Mia Mia is offline
external usenet poster
 
Posts: 101
Default Pick numbers

Thank you!!!!
--
Best regards
Mia


"Barb Reinhardt" skrev:

You'd use MID.

=MID("51900125",3,1)

Is that what you're looking for?
--
HTH,

Barb Reinhardt



"Mia" wrote:

Hi,

If I have a string of numbers, for example 51900125 and I want to pick
number three (in this example 9) in a specified cell, what shall i type.
I have tried Left and right but then I got a string of figures.
Do anuone know how to solve this?


--
Best regards
Mia

  #8   Report Post  
Posted to microsoft.public.excel.programming
Mia Mia is offline
external usenet poster
 
Posts: 101
Default Pick numbers

Thank you!
--
Best regards
Mia


"Rick Rothstein" skrev:

As others have mentioned, you would use the MID function. This function can
retrieve one or more characters from a text string. The function's first
argument is the text you want to extract characters from, its second
argument is the position number within the string that you want to start
extracting characters from and its third argument is the total number of
characters to extract. So, assuming cell A1 contained your 51900125 piece of
text, you would use this formula to extract the single character at position
3 in the text...

=MID(A1,3,1)

If you had wanted to pull the four characters out of the text string
starting at position 3 (that is, the numbers 9001), you would use this
formula...

=MID(A1,3,4)

That should give you enough information to see how to use the function in
the future. Interestingly enough, you could have done what you originally
asked for using only the RIGHT and LEFT functions that you wrote that you
had tried; consider this formula to retrieve the 3rd character (the 9 in the
text 51900125)...

=RIGHT(LEFT(A1,3))

Of course, you should always use the MID function to pull characters from
within the middle of a text string and not the above combination formula
(one function call is more efficient than two function calls)... I only
showed it to you as an interesting side comment.

--
Rick (MVP - Excel)



"Mia" wrote in message
...
Hi,

If I have a string of numbers, for example 51900125 and I want to pick
number three (in this example 9) in a specified cell, what shall i type.
I have tried Left and right but then I got a string of figures.
Do anuone know how to solve this?


--
Best regards
Mia


.

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
pick top 5 out of 8 numbers poncho Excel Discussion (Misc queries) 4 February 12th 09 08:02 AM
need to set up a formula to pick random numbers Joe Excel Worksheet Functions 3 September 9th 08 09:10 PM
How to pick up 1 number with a lot of same numbers in row/ column? Jon New Users to Excel 1 August 14th 08 07:37 AM
Can Excel pick random numbers from 1-300 and not repeat numbers? Julian Excel Discussion (Misc queries) 1 June 7th 06 07:17 AM
Possible to pick out the lowest eight numbers in a row? Christian Borchgrevink-Vigeland Excel Discussion (Misc queries) 4 December 23rd 04 03:53 PM


All times are GMT +1. The time now is 04:15 PM.

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

About Us

"It's about Microsoft Excel"