View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ardus Petus Ardus Petus is offline
external usenet poster
 
Posts: 718
Default Looping a range selection

For k = 6 To 14
range("BP" & k:&":HM" & k).Select
'Random code
Next k

HTH
--
AP

a écrit dans le message de
oups.com...
Hello,

I'm quite new to VBA Programming, but have used many sources to figure
out what I needed to get the job done. A lot of my problems are
format-based where I do know the logic of what I want to do but the
coding in VBA is what slows me down.

I'm trying to make a loop where I can cycle through a range of selected
cells. Here is an example of my code:


For k = 6 To 14
range("BPk:HMk").Select

'Random code

Next k


Obviously this won't work because the variable I want to change is
within quotes. What I want to do is simple yet I can't figure out the
proper coding or find what I need searching the web. Any help would be
much appreciated.

---Achilles