Thread
:
Finding all the values and storing them
View Single Post
#
4
Posted to microsoft.public.excel.programming
Ardus Petus
external usenet poster
Posts: 718
Finding all the values and storing them
There was a typo in tony's code (set rng1 twice instead of set rng2)
HTH
--
AP
'--------------------
Sub a()
Dim rng1 As Range
Dim rng2 As Range
Set rng1 = Worksheets("Sheet1").Range("A2")
Set rng2 = 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
'-------------------------
"jhahes" a écrit dans
le message de news:
...
the code isn't putting anything on Sheet2
--
jhahes
------------------------------------------------------------------------
jhahes's Profile:
http://www.excelforum.com/member.php...o&userid=23596
View this thread:
http://www.excelforum.com/showthread...hreadid=544439
Reply With Quote
Ardus Petus
View Public Profile
Find all posts by Ardus Petus