View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default How to add multiple values to this macro

Actually, you have a bug in your original code.

Set c = .Find(sStr, _
After:=Range("B1"), _
LookIn:=xlValues, _
LookAt:=xlPart, _
MatchCase:=False)

Range("B1") should be qualified.

Set c = .Find(sStr, _
After:=.Range("B1"), _
LookIn:=xlValues, _
LookAt:=xlPart, _
MatchCase:=False)

(Note that extra dot)

If you ever use this code against a sheet that isn't active, you'll be happy
that you made the change.

"J.J." wrote:

Perfect! Thank you so much.


--

Dave Peterson