Seperating data

Tabako1960

New Member
Joined
Jun 24, 2024
Messages
2
Office Version
  1. 2010
Platform
  1. Windows
  2. MacOS
  3. Mobile

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
With the current version of Excel, a formula solution would not be too much of a problem, but with Excel 2010, your text functions are more limited than with later versions. If you are open to a VBA solution, a user defined fuction (UDF) is an option.
Book1
AB
1AddressStripped Address
2"McKintry, Kevin" <K.McKintry@abccorp.com>, "Blass, Bill" <b.blass@transco.com>, "John.Palmer" <johnpalmer@BettleCorp.com>,K.McKintry@abccorp.com,b.blass@transco.com,johnpalmer@BettleCorp.com
3K.McKintry@abccorp.com, "Blass, Bill" <b.blass@transco.com>, johnpalmer@BettleCorp.comK.McKintry@abccorp.com,b.blass@transco.com,johnpalmer@BettleCorp.com
4K.McKintry@abccorp.com,b.blass@transco.com, johnpalmer@BettleCorp.comK.McKintry@abccorp.com,b.blass@transco.com,johnpalmer@BettleCorp.com
Sheet1
Cell Formulas
RangeFormula
B2:B4B2=stripAddr(A2)

Something like this will do the job
VBA Code:
'UDF to clean email addresses
Function StripAddr(MAddr As String) As String
    Dim S As String, I As Long
    Dim SA As Variant                                 'string array
   
    SA = Split(Replace(Replace(MAddr, "<", ","), ">", ","), ",")
        For I = 0 To UBound(SA)
            If InStr(SA(I), "@") > 1 Then
                S = S & Trim(SA(I)) & ","
            End If
        Next I
        S = Left(S, Len(S) - 1)
    StripAddr = S
End Function

Though there is probably a clever RegEx way to do it as well.
 
Upvote 0

Forum statistics

Threads
1,221,575
Messages
6,160,603
Members
451,657
Latest member
Ang24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top