Written by Allen Wyatt (last updated October 4, 2025)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365
Tom has a worksheet that contains quite a bit of text. He needs a way to pull, from any given cell's text, the first letter of each word within parentheses. For instance, if a cell contains "There is a weed (during the spring) that needs to be eradicated", then Tom needs to pull "dts" from that text. He suspects this must be done with a macro but doesn't know where to start.
If you wanted to perform this task manually, it isn't that difficult to accomplish. I'll go through the steps quickly and generally.
Let's assume that your text is in column A and that each cell contains only a single set of parentheses. In this case you could put the following in column B:
=IFERROR(LEFT(MID(A1,FIND("(",A1)+1,LEN(A1)),FIND(")",
MID(A1,FIND("(",A1)+1,LEN(A1)))-1),"")
Even though I've broken the formula to two lines here, remember that it is a single formula and should be entered as such. Copy it down as many cells as necessary. What you end up with in column B is the text contained with the first set of parentheses (if any) if the cell.
Next, select all the cells in column B, press Ctrl+C, and then use Paste Special to paste values back into those cells. This gets rid of the formulas but leaves the extracted parenthetical text.
Now the cells in column B should still be selected. You want to use the Text to Columns wizard (from the Data tab of the ribbon) to split the words out into individual cells. This is easy to do using a space as a delimiter in the wizard. After doing this, you end up with a single word in each column starting with column C.
Now, in the first column that doesn't have any words in it (let's say that is column J) you would enter the following formula:
=LEFT(TRIM(C1),1) & LEFT(TRIM(D1),1) & LEFT(TRIM(E1),1) & LEFT(TRIM(F1),1) & LEFT(TRIM(G1),1)) & LEFT(TRIM(H1),1) & LEFT(TRIM(I1),1)
Again, this is a single formula even though it is shown here on three lines. This results in your desired first letters in column J.
Obviously, this process is "doable" if you only need to pull the letters every once in a while. If you need to do it more often, then you would be better served to rely on a user-defined function to do the work for you. The following is a simple one that will work just fine:
Function PickInitials(sRaw As String) As String
Dim sTemp As String
Dim J As Integer
Dim Wds() As String
sTemp = ""
J = InStr(sRaw, "(")
If J > 0 Then
sTemp = Mid(sRaw, J + 1)
J = InStr(sTemp, ")")
If J > 0 Then
sTemp = Left(sTemp, J - 1)
End If
Wds = Split(sTemp)
sTemp = ""
For J = 0 To UBound(Wds)
sTemp = sTemp & Left(Trim(Wds(J)),1)
Next J
End If
PickInitials = sTemp
End Function
To use the function, all you need to do is to use the following in a cell:
=PickInitials(A1)
The function will work just fine if there is no parenthetical text in the cell, if there is only an opening parenthesis, and it will not be thrown by multiple spaces between words. The function retains the capitalization of the initial letters. If you want it to return all the letters as lowercase, you could change the final line of the macro to this:
PickInitials = LCase(sTemp)
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13622) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365.
Program Successfully in Excel! This guide will provide you with all the information you need to automate any task in Excel and save time and effort. Learn how to extend Excel's functionality with VBA to create solutions not possible with the standard features. Includes latest information for Excel 2024 and Microsoft 365. Check out Mastering Excel VBA Programming today!
VBA makes it easy to copy a worksheet from the current workbook into a brand-new workbook. You may want to delete some ...
Discover MorePaste Special is a great tool that allows you to modify the values in a range of cells in your worksheets. You may want, ...
Discover MoreGrab some info from a source other than Excel, and you may find the need to delete a certain pattern of rows from a ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2025-11-18 13:52:47
J. Woolley
The following formula will extract the interior of a parenthetical expression from text in cell A1:
=REGEXEXTRACT(A1, "(?:.*\()(.*)(?:\).*)", 2)
But I haven't determined a regular expression pattern that returns the first letter of each word in the parenthetical expression. Can you help with that?
My Excel Toolbox includes the following function that is similar to REGEXEXTRACT (which currently requires Excel 365):
=RegExMatch(Text, Pattern, [Mode], [IgnoreCase], [Multiline])
See https://sites.google.com/view/MyExcelToolbox/
2025-11-14 15:01:13
J. Woolley
The Tip assumes there is only one parenthetical expression. Therefore, the following Excel 2024 formula can be used:
=CONCAT(LEFT(TEXTSPLIT(TEXTAFTER(TEXTBEFORE($A$1, ")"), "("),
" ", ,TRUE), 1))
My Excel Toolbox includes the following function to return the substring of Text between two substrings BeginAfter and EndBefore:
=Between(Text, BeginAfter, EndBefore, [CaseSensitive], [Direction])
It also includes the following alternative to TEXTSPLIT:
=SplitText(Text, [Delimiter], [CaseSensitive], [Limit], [Remainder])
Therefore, the following My Excel Toolbox formula can be used:
=CONCAT(LEFT(SplitText(TRIM(Between($A$1, "(", ")"))), 1))
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments