Excel Find Short Name in Full Name

June 27, 2008 at 14:41:33
Specs: XP SP3, 3Mhz - 1.5GB


i have a excel problem!!

i have a A column with short name cell: bill gates
i have a B column witn full name cell: Sr. Bill gates Junior...

how find Column A name in Colum B?



See More: Excel Find Short Name in Full Name

Report •

June 28, 2008 at 19:53:53

Make sure you have column headings in Row 1 of Column A and B then try this code:

Sub FindShortName()
'Change Range To Fit Your Data
For Each sName In Range("A2:A10")
With Columns("B")
Set lName = .Find(What:=sName, LookAt:=xlPart)
MsgBox lName.Address
End With
End Sub

Report •

July 1, 2008 at 13:25:50

show error in "MsgBox lName.Address".. i have office 2003 in spanish...thanks


Report •

July 1, 2008 at 21:13:43

What is the error?

Report •

Related Solutions

Ask Question