Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA-How do I increment columns in VBA?

I want to run a macro that cycles through columns within a For loop.
can do this within a range no problem. How to do it in column
though...I don't know. Any help?

Eg. For i=1 To 4
Range("A" & (i), "BB" & (i)).Select
Next i

How can I have this code cycle through columns? Thanks!

Rya

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Excel VBA-How do I increment columns in VBA?

Ryan,

Not sure if this is what you are looking for...

For i = 1 To 10
Cells(1, i).Select
Next i

HTH... John
www.spreadsheetsolutions.com

-----Original Message-----
I want to run a macro that cycles through columns within

a For loop. I
can do this within a range no problem. How to do it in

columns
though...I don't know. Any help?

Eg. For i=1 To 4
Range("A" & (i), "BB" & (i)).Select
Next i

How can I have this code cycle through columns? Thanks!

Ryan


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

.

Reply
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
Dragging across columns: I want column constant, but row increment CM Excel Worksheet Functions 7 April 30th 23 07:41 PM
Why Excel Does not increment by 2 or 3, odd/even numbers? alsaleh Excel Worksheet Functions 6 November 16th 09 02:06 AM
How to Increment Time using EXCEL ?? Crackles McFarly New Users to Excel 3 August 20th 07 07:46 AM
Excel Increment columns in rows FGM Excel Discussion (Misc queries) 4 January 3rd 05 04:24 PM
Excel VBA-How do I increment columns in VBA? waveracerr[_4_] Excel Programming 2 February 5th 04 07:36 PM


All times are GMT +1. The time now is 05:23 PM.

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"