Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in


 How to quickly find the position of first letter (alpha) from string in Excel?

For instance, here is a list of text strings which are mixed with numbers and letters in a sheet, and to find the position of first letter (alpha character) as below screenshot shown maybe a troublesome problem for you. However in this article, I introduce some tricks on solving this job quickly for you.

Change Case (Change text case to UPPERCASE, lowercase, Proper Case or Sentence case...)

doc change case

Here are some formulas to help you to find the position of first letter in a string.

Select a blank cell which you will place the result, here take B2 for instance, and enter this formula =MATCH(TRUE,ISERROR(VALUE(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1))),0), hold Shift + Ctrl, and press Enter key to get the result. Then click at B2 and drag auto fill handle to over the cells which need to apply this formula. See screenshot:
doc find first letter position 2

Tip: with above formula, if there is no any alpha character, it will display an error value.
doc find first letter position 3

In the formula, A2 is the cell you want to find the first alpha’s position, you can change it as you need.

If you usually apply Defined Function, here also has a Defined Function to help you find the first alpha and return to its position.

1. Press Alt + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste below code to the Module script.

VBA: Find position of first letter

Function FirstNonDigit(xStr As String) As Long
    Dim xChar As Integer
    Dim xPos As Integer
    Dim I As Integer
    For I = 1 To Len(xStr)
        xChar = Asc(Mid(xStr, I, 1))
        If xChar <= 47 Or _
           xChar >= 58 Then
            xPos = I
            Exit For
        End If
    FirstNonDigit = xPos
End Function

doc find first letter position 5

3. Save the code and go back to the sheet, select a blank cell and enter this formula =FirstNonDigit(A15), press Enter key, and you can find the position of first alpha character.
doc find first letter position 6

But in some other cases, you may want to extract only alpha characters from a mixed string as below screenshot shown. In this situation, you can apply the Remove Characters utility of Kutools for Excel – a handy and helpful add in tool to quickly get it done.
doc find first letter position 7

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

After free installing Kutools for Excel, please do as below:

1. Make a copy for the strings you want to extract alpha characters from. See screenshot:
doc find first letter position 8

2. Then select the copied strings and click Kutools > Text > Remove Characters. See screenshot:
doc find first letter position 12

3. And in the prompt Remove Characters dialog, check Non-alpha option only, you can preview the removed results as you check in the Preview box. See screenshot:
doc find first letter position 10

4. Click Ok or Apply. Now only the alpha characters are extracted.
doc find first letter position 11

Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.