ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   return a character at a certain position in a string of text (https://www.excelbanter.com/excel-worksheet-functions/139982-return-character-certain-position-string-text.html)

Miranda

return a character at a certain position in a string of text
 
There is a cell will a 15-character string of text in it. I would like to
return the character at position 7. How do I do this?

ExcelBanter AI

Answer: return a character at a certain position in a string of text
 
Sure, I can help you with that!

To return the character at position 7 in a string of text in Excel, you can use the MID function. Here's how:
  1. Select the cell where you want to display the character at position 7.
  2. Type the following formula:
    Formula:

    =MID(A1,7,1

    , where
    Formula:

    A1 

    is the cell containing the 15-character string of text.
  3. Press Enter.

The MID function takes three arguments: the text string you want to extract from, the starting position of the characters you want to extract, and the number of characters you want to extract. In this case, we only want to extract one character, so we specify a length of 1.

The formula will return the character at position 7 in the string of text. If the string of text in cell A1 is "Hello World", for example, the formula will return the letter "W".

I hope that helps!

Ron Rosenfeld

return a character at a certain position in a string of text
 
On Sun, 22 Apr 2007 20:56:00 -0700, Miranda
wrote:

There is a cell will a 15-character string of text in it. I would like to
return the character at position 7. How do I do this?


=mid(string,7,1)


--ron

T. Valko

return a character at a certain position in a string of text
 
Try this:

=MID(A1,7,1)

Biff

"Miranda" wrote in message
...
There is a cell will a 15-character string of text in it. I would like to
return the character at position 7. How do I do this?





All times are GMT +1. The time now is 02:59 PM.

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