View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
fisch4bill fisch4bill is offline
external usenet poster
 
Posts: 43
Default Macro command to move cell selection

Sub DoSomething()
Dim X as Long

For X = 1 To 7 'or any number that addresses the whole range
Range("A" & X).Select

.. . . your value manipulation code goes here

Next X
End Sub

HTH

"DOOGIE" wrote:

I am writing a macro for a spreadsheet where I have values stored in one
column. I want to run a loop where each time the loop runs, I select each
cell in the column. For example, my values are stored in column A, cells 1
through 7. On loop 1 I want to select cell A1, loop 2 select cell A2, loop 3
select A3 and so on. How can I set this up in a macro to increment cell
selection as I move through my loop?