ivan rosa
asked on
Extract Text from a cell
Hello Folks,
I'm trying to extract the word that starts with " CHARS " from the string below within a cell, can anybody kindly provide any ideas on how to?
I'm trying to extract the word that starts with " CHARS " from the string below within a cell, can anybody kindly provide any ideas on how to?
ABCDEFGH MMM Upgrade Patch (MMM111x) - Win 7,ABC006A8,TXT_CCC_Install_Collection_jazzmen,Required,CCC ABCDEFGH CCC Upgrade Patch (QWERTYU),Deployment failed,No additional information,0x87D00213 (-2016411117),Timeout occurred,CHARS10133X166,19,4/12/2019 7:03 PM,Error,Script,No,(SYSTEM),No,No,Yes,
With the text in A1 you can use
It extract the value CHARS10133X166
=IFERROR(MID(A1,FIND("CHARS",A1),FIND(",",A1,FIND("CHARS",A1))-FIND("CHARS",A1)),"")
It extract the value CHARS10133X166
ASKER
Hi John, thanks for your quick support. the above plugin required a license...
Hi Ejgil, Thanks for your technically although when I run the formula it only leaves the cell blank...
Hi Ejgil, Thanks for your technically although when I run the formula it only leaves the cell blank...
Try the trial version and if it does what you want , then you can license it
You can use this user defined function.
=FindString("A1")
Function FindString(r As Range) As String
Dim strParts() As String
Dim IntEntry As Integer
strParts = Split(r, ",")
For IntEntry = 0 To UBound(strParts)
If strParts(IntEntry) Like "*CHARS*" Then
FindString = strParts(IntEntry)
Exit For
End If
Next
End Function
Usage:=FindString("A1")
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
A one-liner of VBA will do:
Public Function GetCode(FullCode) As String
FindCode = Split(Split(FullCode, "CHARS")(1), ",")(0)
End Function
ASKER
Thanks everyone involved ! I'd really appreciated
https://www.extendoffice.com/documents/excel/3639-excel-extract-part-of-string.html