View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
short_n_curly[_5_] short_n_curly[_5_] is offline
external usenet poster
 
Posts: 1
Default help needed with LOOPS please


basically i have this code

Private Sub Worksheet_Activate()


If Range("AE1") = Range("A1") Then
Range("A1").Offset(0, 1) = Range("AD1")
Else
If Range("AE1") = Range("A2") Then
Range("A2").Offset(0, 1) = Range("AD1")
End If
End If

End Sub

so that when the worksheet is activated it will check cell a1 to see if
it equals cell ae1
if so then it will place the value in cell ad1 to the next cell i.e b1
if this is false it will move on to cell a2 with the same criteria
however it would be impractical to persue with the currant code even
though it works due to the fact that there may be several thousand
entries, is there a loop code that would change the variables as i have
never used loops before i am a bit lost

your help would be much appreciated thanks


--
short_n_curly
------------------------------------------------------------------------
short_n_curly's Profile: http://www.excelforum.com/member.php...o&userid=21576
View this thread: http://www.excelforum.com/showthread...hreadid=384154