Extract The First Letter Of A String

  • Re: Extract The First Letter Of A String


    nevermind, got it


    Code
    newString = left(originalString, 1)


    Where 1 is the number of characters you want to extract.

  • Re: Extract The First Letter Of A String


    there is also a worksheet function that does the same:


    =left(A1,1)


    where A1 is a cell containing the string to evaluate (you can also input the string directlly into this formula instead of the cell reference if you want to.)

  • Re: Extract The First Letter Of A String


    LEFT(TRIM(B1),1)


    By using the TRIM function, you will remove all leading spaces at the beginning of the string.
    By using the LEFT function on the previously trimmed string, the returned character will be the first non-blank character from the string, be it a letter or number.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!