R Rick Rothstein \(MVP - VB\) Sep 5, 2007 #2 What is the code to move down the cells in a column one by one? Two different approaches to do the same thing... Sub TestCode1() Dim R As Range For Each R In Range("A1:A20") ' Your code goes here in ' place of the following R.Value = R.Row Next End Sub Sub TestCode2() Dim X As Long For X = 1 To 20 ' Your code goes here in ' place of the following Range("B" & CStr(X)).Value = X Next End Sub Rick
What is the code to move down the cells in a column one by one? Two different approaches to do the same thing... Sub TestCode1() Dim R As Range For Each R In Range("A1:A20") ' Your code goes here in ' place of the following R.Value = R.Row Next End Sub Sub TestCode2() Dim X As Long For X = 1 To 20 ' Your code goes here in ' place of the following Range("B" & CStr(X)).Value = X Next End Sub Rick
S Steve Sep 5, 2007 #3 Rick, Double thanks here and thanks for the code to move through worksheets! Steve