Bass71
MIS
- Jun 21, 2001
- 79
I have the following code to iterate through ranges and determine if Variant i exists in any cell. For the most part, the cells have only one value, either matching i or not, but when there's more text in the cell than just i, I am sunk.
Dim rng As Range, r As Range, iCol As Integer, i As Variant
Set rng = Range([B2], [B2].End(xlDown))
i = InputBox("Type Text or Number to be Searched")
For Each r In rng
For iCol = 2 To 11
With Cells(r.Row, iCol)
If .Value = i Then...
Dim rng As Range, r As Range, iCol As Integer, i As Variant
Set rng = Range([B2], [B2].End(xlDown))
i = InputBox("Type Text or Number to be Searched")
For Each r In rng
For iCol = 2 To 11
With Cells(r.Row, iCol)
If .Value = i Then...