Results 1 to 3 of 3

How to loop till last row with data?

Threaded View

  1. #1
    Registered User
    Join Date
    02-20-2012
    Location
    Chicago, Illinois
    MS-Off Ver
    Excel 2010
    Posts
    25

    How to loop till last row with data?

    Hello to my forum friends!

    I have a worksheet of data that I need to parse. Got a pretty extensive macro script already running, but I'm still kinda' new to scripting in Excel VBA.

    My worksheet looks like this:

    =====
    known-starting-point - row of data
    row of data
    row of data
    [empty row (cells w/formulas & formatting but no values)]
    row of data
    row of data
    [empty row (cells w/formulas & formatting but no values)]
    row of data
    [empty row (cells w/formulas & formatting but no values)]
    last row of data
    =====

    I'll just be reading the data, not modifying or deleting. I have no way of knowing ahead of time which rows will be "empty", so I have to determine that, and skip to the next row.

    I need to loop through all the rows from the known-starting-point to the last row that contains values. "Empty" rows that I want to skip may contain formulas (no values) and cell formatting. Something like this pseudo-code:

    For i = known-starting-row to last-row-of-data Step 1
      If empty row, skip loop to next row
      Do stuff to row with data
    Next
    Thanks in advance for pointing me in the right direction!

    BTM
    Last edited by btmtdk; 03-19-2012 at 10:35 AM. Reason: Flag as Resolved

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