Excel Find Short Name in Full Name

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

Hi!!

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?

Thanks!!

the_xox


See More: Excel Find Short Name in Full Name

Report •


#1
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
Next
End Sub


Report •

#2
July 1, 2008 at 13:25:50

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

the_xox


Report •

#3
July 1, 2008 at 21:13:43

What is the error?

Report •

Related Solutions


Ask Question