See if it Helps:

Function ExtractName(Rng As Range, rng2 As Range) As String
Dim M_Loc() As String
Dim N_Loc() As String

    M_Loc = Split(Rng, ",")
    N_Loc = Split(rng2, ",")
        For i = LBound(M_Loc) To UBound(M_Loc)
            If Trim(M_Loc(i)) = "MOTHER" Then
            ExtractName = Trim(N_Loc(i))
            Exit Function
            End If
            
        Next
    
End Function
-----Original Message-----
From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of N Pradhan
Sent: Saturday, August 06, 2011 5:28 PM
To: excel-macros@googlegroups.com
Subject: $$Excel-Macros$$ Extract only mother names

I want a formula to extract only mother names as per attached sheet.

Please help.

--
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip 2. Join our LinkedIN group @
http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and
Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Attachment: Copy of extract names.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12

Reply via email to