+ Reply to Thread
Results 1 to 2 of 2

Thread: looping thru all columns in a worksheet

  1. #1
    Registered User
    Join Date
    11-01-2006
    Posts
    1

    Smile looping thru all columns in a worksheet

    Hello, what i need to do is loop (or other method) thru all the columns in a worksheet. There are date fields in the same rows in each column. I have to
    retrieve information if a date exists. Any help would be appreciated.

    Thanks, kawi125

  2. #2
    Forum Guru Carim's Avatar
    Join Date
    04-07-2006
    Posts
    3,999
    Hi,

    To be adjusted to your need
    Sub Check()
    Dim i As Integer
    Dim LastCol As Integer
    LastCol = Range("IV1").End(xlToLeft).Offset(0, 1).Column
    For i = 1 To LastCol
    Cells(1, i).Select
    
    add your code
    
    Next i
    End Sub
    HTH
    Carim

+ 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.2.0