LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
loops???? harry buggy Excel Worksheet Functions 2 August 14th 07 06:33 PM
Loops [email protected] Excel Discussion (Misc queries) 2 October 14th 06 02:52 PM
do loops saravanan Excel Worksheet Functions 0 June 13th 06 10:53 AM
For next loops Kate Excel Discussion (Misc queries) 5 May 22nd 06 01:11 PM
for each loops adncmm1980[_3_] Excel Programming 1 October 4th 04 12:56 PM


All times are GMT +1. The time now is 07:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"