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 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

 
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
How do i set up a counter? Bulldog21 Excel Discussion (Misc queries) 2 July 23rd 08 02:12 PM
Add A Day Counter EisPanzer Excel Discussion (Misc queries) 3 May 9th 07 01:24 AM
counter Haza Excel Discussion (Misc queries) 2 January 20th 06 08:30 PM
Counter Sdbenn90 Excel Discussion (Misc queries) 4 January 9th 06 11:43 AM
Max value in Do While counter ChrisG[_4_] Excel Programming 7 September 24th 03 01:36 AM


All times are GMT +1. The time now is 02: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"