F
Francis Hookam
The Find Method in Visual Basic Help gives the example copied below - I
cannot work out how to use it for my needs which are:
Where X = a numeral from 1 to 9
Find X within (say) B2:B10
Find X within B2:J10
Find X within B2:C4
In this case I only need to know if the particular numeral exists in the
range although, for future use it would be good to be able to return the
cell reference
Can you help please?
Francis Hookham
________________________________________
With Worksheets(1).Range("a1:a500")
Set c = .Find(2, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Value = 5
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
cannot work out how to use it for my needs which are:
Where X = a numeral from 1 to 9
Find X within (say) B2:B10
Find X within B2:J10
Find X within B2:C4
In this case I only need to know if the particular numeral exists in the
range although, for future use it would be good to be able to return the
cell reference
Can you help please?
Francis Hookham
________________________________________
With Worksheets(1).Range("a1:a500")
Set c = .Find(2, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Value = 5
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With