Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

easy find question

Status
Not open for further replies.

lekayra

MIS
Joined
Apr 1, 2003
Messages
4
Location
FR
Hi there!

All I want to do is to find cells containg a specific word (in this case it is "dar") then copy that cell to the cell above it.

I guess it shouldnt be difficult. Yet I couldnt find a conventional method.


Thanx in advance,
Kayra.
 
Almost directly from the help file:

With Worksheets(1).Range("a1:a1000")
Set c = .Find("dar", lookin:=xlValues, lookat:=xlpart)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.offset(-1,0).value = c.value
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With Rgds
Geoff
&quot;Some cause happiness wherever they go; others whenever they go.&quot;
-Oscar Wilde
 
thx a lot. It worked smoothly.

Kayra.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top