Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I alter this code so that if performs the function not just on row 2
but all the way down through row 300. I Am sure I could repeat the code for each of the 300 rows but I bet there is a better way. Private Sub Worksheet_Calculate() Me.Range("A2").Value = Me.Range("D2") End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for i=2 to 300
me.cells(i,1).value=me.cells(i,4).value next i though it's not clear from your post whether A3 should equal D2 or D3.... Tim "Patrick Simonds" wrote in message ... How can I alter this code so that if performs the function not just on row 2 but all the way down through row 300. I Am sure I could repeat the code for each of the 300 rows but I bet there is a better way. Private Sub Worksheet_Calculate() Me.Range("A2").Value = Me.Range("D2") End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry
Me.Range("A2").Value = Me.Range("D2") A3 D3 A4 A5 A6 A6 All the way down to row 300 "Tim Williams" <saxifrax at pacbell dot net wrote in message ... for i=2 to 300 me.cells(i,1).value=me.cells(i,4).value next i though it's not clear from your post whether A3 should equal D2 or D3.... Tim "Patrick Simonds" wrote in message ... How can I alter this code so that if performs the function not just on row 2 but all the way down through row 300. I Am sure I could repeat the code for each of the 300 rows but I bet there is a better way. Private Sub Worksheet_Calculate() Me.Range("A2").Value = Me.Range("D2") End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Having tried your cod, it does exactly what I need. Thank you
"Tim Williams" <saxifrax at pacbell dot net wrote in message ... for i=2 to 300 me.cells(i,1).value=me.cells(i,4).value next i though it's not clear from your post whether A3 should equal D2 or D3.... Tim "Patrick Simonds" wrote in message ... How can I alter this code so that if performs the function not just on row 2 but all the way down through row 300. I Am sure I could repeat the code for each of the 300 rows but I bet there is a better way. Private Sub Worksheet_Calculate() Me.Range("A2").Value = Me.Range("D2") End Sub |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Patrick,
Me.Range("A2:A301").Value = Me.Range("D2:D301").Value The Me qualifier assumes code is in a Worksheet module. Regards, Peter T "Patrick Simonds" wrote in message ... How can I alter this code so that if performs the function not just on row 2 but all the way down through row 300. I Am sure I could repeat the code for each of the 300 rows but I bet there is a better way. Private Sub Worksheet_Calculate() Me.Range("A2").Value = Me.Range("D2") End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
printing issue - want to repeat two rows and also 5 rows in column | Excel Discussion (Misc queries) | |||
how to repeat rows at the bottom while using the rows repeat at to | Setting up and Configuration of Excel | |||
Title Cut Off if Rows to Repeat & Columns to Repeat are Both Selec | Excel Discussion (Misc queries) | |||
Unable to select rows in the repeat rows on top option | Excel Discussion (Misc queries) | |||
repeat code until row 24 | Excel Programming |