Hi there (from one Greg to another!)
There are two ways to do what you want.
The first way uses Excel. If the first of your data cells is A1 then insert the following formula in cell B1 & copy it all the way down beside your data:
=IF(LEFT(A1, 12) = "First Name) ", MID(A1, 13, 999), IF(LEFT(A1, 11) = "Last Name) ", MID(A1, 12, 999), "Error"))
This trims the unwanted first part of the text & you can then use Copy and Paste Special > Values to overwrite the original data.
The second way uses Excel VBA. Insert the following code into a VBA module in your workbook:
Option Explicit
Sub ProcessText()
Dim cel As Range
Dim txt As String
With Selection
For Each cel In .Cells
txt = cel.Value
If InStr(txt, ")") <> 0 Then
cel.Value = Mid(txt, InStr(txt, ")") + 2, 999)
End If
Next cel
End With
End Sub
Then just select the range you want to process & run the above routine.
Hope this helps - any feedback would be appreciated.
Gest regards,
Greg M
Bookmarks