View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
tony h[_109_] tony h[_109_] is offline
external usenet poster
 
Posts: 1
Default Finding all the values and storing them


try


Sub a()
Dim rng1 As Range
Dim rng2 As Range

Set rng1 = Worksheets("Sheet1").Range("A2")
Set rng1 = Worksheets("Sheet2").Range("A2")

Do
If rng1 = 61538 Then
rng2 = rng1.Offset(, 1)
Set rng2 = rng2.Offset(1)
End If

Set rng1 = rng1.Offset(1)
Loop Until rng1.Row = 100
MsgBox "done"
End Sub


cheer

--
tony
-----------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...fo&userid=2107
View this thread: http://www.excelforum.com/showthread.php?threadid=54443