+ Reply to Thread
Results 1 to 4 of 4

For each to loop through columns

  1. #1
    Registered User
    Join Date
    11-05-2007
    Posts
    34

    For each to loop through columns

    Hi,
    May I ask how do I write a code to run for each loop to loop through each column to the last column in the worksheet.

    For example:

    I start from D2,i need to loop E2,F2,G2...

    Thanks

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    How about

    Please Login or Register  to view this content.

    rylo

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello alien3011,

    This will loop through each column in row 2 used on the worksheet.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    alien3011,

    Can you please explain why you posted rylo answer on another forum without asking him for help

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1