
Public Function TrovaV(Zona As Range, Itm As Range) As String
TrovaV = Zona.Find(Itm).Address
End Function |
Option Explicit
Sub Macro1()
Dim Val As String, Risposta As Integer
On Error Resume Next
Val = InputBox("Digitare il testo da cercare", , "")
If Val <> "" Then
Selection.Find(What:=Val, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate 'al posto di Selection puoi usare Cells se lo vuoi in tutto il foglio
MsgBox ActiveCell.Address
End If
End Sub |
