For the examples in this section, cell A1 contains...
This is my <M> test string
=LEN(A1)
26
For the examples in this section, cell A1 contains...
This is my <M> test string
=MID(A1,6,2)
is
=LEFT(A1,4)
This
=RIGHT(A1,4)
ring
=FIND("is",A1)
3
=LEFT(A1,FIND("<",A1)-1)
=TEXTBEFORE(A1,"<")
Excel onlyThis is my
This is my
=RIGHT(A1,LEN(A1)-FIND(">",A1))
=TEXTAFTER(A1,">")
Excel onlytest string
test string
=MID(A1,FIND("<",A1)+1,FIND(">",A1)-FIND("<",A1)-1)
=TEXTBEFORE(TEXTAFTER(A1,"<"),">")
Excel onlyM
M
To extract a number from a SQL server build string. In this case we want to extract the 4175 from 16.0.4175.1 in cell B16...
=NUMBERVALUE(INDEX(TEXTSPLIT(B16,"."),3))
Excel only=VALUE(INDEX(SPLIT(B16,"."),3))
Google only4175
4175
For the examples in this section, cell A1 contains...
ExAmple tExt
For the examples in this section, cell A1 contains...
ExAmple tExt
=UPPER(A1)
EXAMPLE TEXT
You can create a VBA (Visual Basic for Applications) shortcut. Use Left Alt + F11 to start VBA (or View - Macros - View Macros - Create)... Select the sheet and Insert - Module (cut & paste the script shown below).
Note that once created your sheet will need to be saved in .xlsm (Excel with Macros) format.Sub AllCaps()
For Each Cell In Selection
If Not Cell.HasFormula Then
Cell.Value = UCase(Cell.Value)
End If
Next Cell
End Sub
=LOWER(A1)
example text
You can create a VBA (Visual Basic for Applications) shortcut. Use Left Alt + F11 to start VBA (or View - Macros - View Macros - Create)... Select the sheet and Insert - Module (cut & paste the script shown below).
Note that once created your sheet will need to be saved in .xlsm (Excel with Macros) format.Sub NoCaps()
For Each Cell In Selection
If Not Cell.HasFormula Then
Cell.Value = LCase(Cell.Value)
End If
Next Cell
End Sub
=PROPER(A1)
Example Text
You can create a VBA (Visual Basic for Applications) shortcut. Use Left Alt + F11 to start VBA (or View - Macros - View Macros - Create)... Select the sheet and Insert - Module (cut & paste the script shown below).
Note that once created your sheet will need to be saved in .xlsm (Excel with Macros) format.Sub InitCaps()
For Each Cell In Selection
If Not Cell.HasFormula Then
Cell.Value = StrConv(Cell.Value, vbProperCase)
End If
Next Cell
End Sub