Worksheet_change macro of DerbyDad03

Microsoft Book: office excel 2003 inside...
May 11, 2010 at 03:28:54
Specs: Windows XP
I Have a worksheet_Change macro of DerbyDad03 as seen here:

I have seen that it search for pen character instead of complete word. For example if there is a word ballpen as well as pen in the list then the macro searches for the first occurance of pen in the list and thus return ballpen's data instead of pen's data.

How the macro can be made to search for complete matching word?

See More: Worksheet_change macro of DerbyDad03

Report •

May 11, 2010 at 13:13:30
Whenever you see this:

.Find(Target, LookIn:=xlValues)

Change it to this:

.Find(Target, LookIn:=xlValues, LookAt:=xlWhole)

This should set .Find to look at the complete cell, not just part of it.

Report •

May 11, 2010 at 21:03:46
Thanks DerbyDad03.

Report •

Related Solutions

Ask Question