Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What is the code to move down the cells in a column one by one?
Thanks! Steve |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rick,
Double thanks here and thanks for the code to move through worksheets! Steve "Rick Rothstein (MVP - VB)" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
move column data based on value of another column | Excel Programming | |||
Move cells to another column based on value of cell | Excel Programming | |||
how to move the cursor to column A after entering data column F | New Users to Excel | |||
move contents of column C based on criteria related to column A | Excel Discussion (Misc queries) | |||
how can I take 3 cells and move them to a different column into 1 | Excel Discussion (Misc queries) |