View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Repeat code over 300 rows

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