Extract cell content to column with formula (1 Viewer)

zezo2021

Member
Local time
Today, 21:33
Joined
Mar 25, 2021
Messages
381
Hello friends
I have a column with notes

I want to convert this column to multi-column
phone
date of birth
zip
city
state

How can I do that using formula

or any suggestion
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 14:33
Joined
Feb 28, 2001
Messages
27,000
It is going to depend on how reliable that cell's formula can be. If it is always the same format, you can do a formula of some kind. If not, you are looking at some complex text parsing.
 

zezo2021

Member
Local time
Today, 21:33
Joined
Mar 25, 2021
Messages
381
I'm try to use mid and instr
work very good
but with one problem is :
Mid (Cell,10, I want here not specific text I need next word only )
I want a number of character dynamics (one word after )
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:33
Joined
May 7, 2009
Messages
19,169
copy in a Module:
Code:
'arnelgp
Public m_text As String
Public m_array As Variant

Public Function getInfo(ByVal strText As String, ByVal strInfoToGet As String) As String
'
'strText        on your same is the text in Range("a1")
'strInfoToget   is the text to extract.
'
'example:
'
'getInfo(A1,"program")
'
'm_text = ""
Dim i As Integer, s As String
Dim ix As Integer
If m_text <> strText Then
    m_text = strText
    m_array = Split(m_text, vbLf)
End If
For i = 0 To UBound(m_array)
    s = Trim$(m_array(i))
    ix = InStr(1, s, strInfoToGet & ":",  vbTextCompare)
    If ix <> 0 Then
        getInfo = Trim$(Mid$(s, ix + Len(strInfoToGet & ":")))
        Exit For
    End If
Next
End Function

on Cell B1, you type:

=getInfo(A1,"program")
 
Last edited:

zezo2021

Member
Local time
Today, 21:33
Joined
Mar 25, 2021
Messages
381
copy in a Module:
Code:
'arnelgp
Public m_text As String
Public m_array As Variant

Public Function getInfo(ByVal strText As String, ByVal strInfoToGet As String) As String
'
'strText        on your same is the text in Range("a1")
'strInfoToget   is the text to extract.
'
'example:
'
'getInfo(A1,"program")
'
'm_text = ""
Dim i As Integer, s As String
Dim ix As Integer
If m_text <> strText Then
    m_text = strText
    m_array = Split(m_text, vbLf)
End If
For i = 0 To UBound(m_array)
    s = Trim$(m_array(i))
    ix = InStr(1, s, strInfoToGet & ":",  vbTextCompare)
    If ix <> 0 Then
        getInfo = Trim$(Mid$(s, ix + Len(strInfoToGet & ":")))
        Exit For
    End If
Next
End Function

on Cell B1, you type:

=getInfo(A1,"program")


Magic
Genius

Thank you so much
 

Users who are viewing this thread

Top Bottom