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

or

How to quickly find the position of first uppercase in Excel text string?

Supposing there is a list of text strings mixed with numbers, uppercase and lowercase letters, how can you quickly find the position of first uppercase letter from the strings? In this article, I introduce the tricks which can quickly specify the position of first upper case without counting them one by one manually in Excel.

Find position of first uppercase in string with formula

Find position of first uppercase in string with Defined Function

Change all letters to UPPERCASE or Proper Case with Kutools for Excel good idea3


Split Names function can quickly split first names, middle names and last names from one cell into separate columns

doc split name
Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel - The Best Office Productivity Tool Will Solve Most of Your Excel Problems
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words...
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum...
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns...
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Create Mailing List and Send Emails by Cell's Value...
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in company; Full features 60-day free trial.

arrow blue right bubble Find position of first uppercase in string with formula


Here is a formula which can help you quickly find the position of first uppercase from string, please do as below:

Select a blank cell next to the string you want to find the first uppercase, B1 for instance, enter this formula =MIN(IF(ISERROR(FIND(CHAR(ROW(INDIRECT("65:90"))),A1)),"",FIND(CHAR(ROW(INDIRECT("65:90"))),A1)))

Press Shift + Ctrl + Enter key to get the correct result, and then drag the auto fill handle over the cells which needed to apply this formula. See screenshot:
doc find position of first uppercase 1


arrow blue right bubble Find position of first uppercase in string with Defined Function

Except formula, you also can use Defined Function to find out the position of first uppercase in the string.

1. Enable the sheet which contains the string you want to find uppercase, and press Alt + F11 keys to open Microsoft Visual Basic for Applications window.

2. 2. Right click at the sheet you want to use the code in Project Explore pane, and click Insert > Module, and paste below code to the blank Module script. See screenshot:

Code: Find position of first uppercase from string.

Function GetFirstUpper(Rg As Range) As Integer
'UpdatebyExtendoffice20160726
    Dim xStr As String
    Dim I As Integer
    Application.Volatile
    GetFirstUpper = -1
    On Error Resume Next
    xStr = Trim(Rg.Value)
    For I = 1 To Len(xStr)
        If (Asc(Mid(xStr, I, 1)) < 91) And (Asc(Mid(xStr, I, 1)) > 64) Then
            GetFirstUpper = I
            Exit Function
        End If
    Next
End Function

doc find position of first uppercase 5

3. Save the code and go back to the sheet you use, and select a blank cell next to the string you want to find uppercase, enter this formula =GetFirstUpper(F1), press Enter key, and then drag autofill handle over cells needed this formula. See screenshot:
doc find position of first uppercase 6

Tip: If there is no uppercase in the string, the result displays as -1.


arrow blue right bubble Change all letters to UPPERCASE or Proper case with Kutools for Excel

In general Excel work, you may usually need to change letter strings to UPPERCAEs, Proper Case, lowercase, Sentence case or ToGgLe CaSe as below screenshot shown.
doc find position of first uppercase 2

With Kutools for Excel, you can apply its Change Case utility to quickly change the letter case as you need.

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. Select the strings you want to change their cases, and click Kutools > Text > Change Case. See screenshot:
doc find position of first uppercase 3

2. Then in the popping Change Case dialog, check the option you want in the Change type section, and you can preview the changing result in the Preview pane. See screenshot:
doc find position of first uppercase 4

3. Then click Ok or Apply to change case.

doc download 1


Kutools for Excel - The Best Office Productivity Tool Increase Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 60-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
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.
  • To post as a guest, your comment is unpublished.
    Kapil · 2 months ago
    Hi,
    Can you please help me to understand why you used INDIRECT("65:90").? What is the meaning of "65:90"?