Sub FindValue()'This example Loops through Column"A", and searches for'a value selected from the input box and diplays the address with a MsgBoxDim r As RangeDim c As RangeDim s As StringDim ms As String
Set r = Range("A1", Range("A65536").End(xlUp))Let ms = "The Value was found at "Let s = InputBox("Enter Value to Find", "Hello", "Enter Number Here")For Each c In r.CellsIf c = s Then MsgBox ms & c.AddressNext c
End Sub
Tags: Excel, VBA, Find, Value, Column, loop, Range.
![Inline image 1](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-twYZhK-5GLWpg77AkiUOvFGTwlhKtHcXxlYWjgbXJpqu9eEdxDoY1JiDgPb2jNH1JAV4sBnGaOKGe-8SxSduCHmtJbf4D5SYxFXT2Lkmq3GkHRU1w64dVsgDTuQcsuq48dzGY-QzRwGQ/s1600/Signature_Andre_Luiz_Bernardes_003-720178.png)
Nenhum comentário:
Postar um comentário