All,
I need some help locating the first occurrence of a number value in a column. The numbers that satisfy the search are 2 thru 10 I'm looking for the 1st occurrence of any of these numbers. Is there a quicker way than doing a loop?
This is a found or not found thing. I'm not interested in listing them if found. As soon as one is found the search is satisfied. then the code moves on to the next bit of business.
I've thrown some code together to give an idea but it's not a cohesive unit.
thanks
I need some help locating the first occurrence of a number value in a column. The numbers that satisfy the search are 2 thru 10 I'm looking for the 1st occurrence of any of these numbers. Is there a quicker way than doing a loop?
This is a found or not found thing. I'm not interested in listing them if found. As soon as one is found the search is satisfied. then the code moves on to the next bit of business.
I've thrown some code together to give an idea but it's not a cohesive unit.
Code:
Set Found6 = Cells.Find(What:="Total", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False)
If Found6 Is Nothing Then
GoTo Skiddle:
End If
'give it focus
'Found6.Select
Found6.EntireColumn
Dim L_Row As Integer
L_Row = ActiveSheet.Range("A65536").End(xlUp).Row
Dim BFlag As Boolean
Dim i As Integer
BFlag = False
For i = 2 To L_Row
Do Until Cells.Value > 1 Or Cells.Value <= 10
thanks