Thread: Counter
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JonoB[_4_] JonoB[_4_] is offline
external usenet poster
 
Posts: 1
Default Counter

Looping through code, I would use the following:

Dim Counter As Integer

For Counter = 1 To 10
Range("A" & Counter).Select
ActiveCell = Counter
Next Counter


Now, assume that I only want the counter to do this on some predefine
rows. How do I then tell the Counter to only loop through thes
specified integers (example = rows 1,5,8).

I have tried the following, which doesnt work.

For Counter = 1,5,8
Range("A" & Counter).Select
ActiveCell = Counter
Next Counter

How do I phrase the "For counter.." part?

Thanks for the hel

--
Message posted from http://www.ExcelForum.com