find text in a sheet
Option Explicit
Sub FindText()
Dim oCell As Range
For Each oCell In ActiveSheet.UsedRange
If oCell = "Some Text" Then
Range(oCell.Offset(1, 0), oCell.Offset(15, 4)).Select
'do something with this range
End If
Next oCell
End Sub
"bandy2000" wrote:
How can I find a specific string in a worksheet and then select a specific
range of cells underneath this cell with the text entry and then calculate
something with the selected data?
Could somebody provide some sample code?
Thanks
|