View Single Post
Staro 16.07.2009., 12:14   #2
gremlin33
just like Registered User
Moj komp
 
gremlin33's Avatar
 
Datum registracije: Jul 2004
Lokacija: zagreb
Postovi: 166
evo, nesto sam sprckao nabrzinu, kod se da srediti još ali tebi ostavljam
u koloni a imas stringove koje trazis, u c1 upisujes string koji trebas naci u koloni a

ako ima kakvih nejasnoca tu sam

Sub trazi()
Dim strUnos As String
strUnos = Range("c1").Value

With Worksheets("Sheet2").Range("a1:a500")

Set c = .Find(strUnos, LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
If c.Value = strUnos Then
'ActiveCell.Font.Color = 85234
c.Font.Color = RGB(253, 19, 25)
Else
Set c = .FindNext(c)
End If

Loop While Not c Is Nothing And c.Address <> firstAddress
If Not c Is Nothing Then
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Value = strUnos
End If
Else

End If
End With
End Sub
__________________
što me snađe da se ovdje nađe!
gremlin33 je offline   Reply With Quote