Results 1 to 9 of 9

Need explanation on how this macro works

Threaded View

  1. #1
    Registered User
    Join Date
    06-09-2010
    Location
    Port McNeill, BC, Canada
    MS-Off Ver
    Excel 2002
    Posts
    6

    Question Need explanation on how this macro works

    I have a macro that was writen a while back by a coworker that I need help understanding. I have attached a picture of the spreadsheet columns in question. The macro starts by looking in column 46 (AT) for the number 1 and then at some point changes the 1 to a 0. That's as much as I understand.

    Could someone please describe in detail what is happening in this macro, step by step. What the s and v and e are meant to do. If I understood this macro then I could possibly reproduce it in another file, which I'm hoping to do.
    Sheets("datastrings").Select
    s = 1
        Do Until v = 1
            v = Cells(s, 46)
            s = s + 1
        Loop
        
    e = s
        Do Until v = 0
            v = Cells(e, 46)
            e = e + 1
        Loop
    Attached Images Attached Images
    Last edited by Leith Ross; 06-09-2010 at 01:53 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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