View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Wildcard with constant

Please ignore my follow up post to you.

Jim Thomlinson wrote:

I'll be darned you can use wildcards! I always used xlPart or xlWhole... And
once again I learn something new...
--
HTH...

Jim Thomlinson

"Dave Peterson" wrote:

Try:

What:=swop & "*"



fugfug wrote:

I have two sheets, one has part names of companies on and one has the
full names on. I'm trying to replace the part names with the full names
by setting a part name to a constant then searching for it in the other
sheet, then copying it over. However I can't find a way of using the
find function with a constant and a wildcard entry. Any ideas? Code
below.

Dim swop As String

swop = ActiveCell
Sheets("Customer List").Select

Range("A2").Select
Cells.Find(What:=swop"*", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet1 (2)").Select
ActiveSheet.Paste

--
fugfug
------------------------------------------------------------------------
fugfug's Profile: http://www.excelforum.com/member.php...o&userid=24950
View this thread: http://www.excelforum.com/showthread...hreadid=387138


--

Dave Peterson


--

Dave Peterson