Results 1 to 5 of 5

Iteratively delete rows from a spreadsheet

Threaded View

  1. #1
    Registered User
    Join Date
    09-13-2005
    Location
    Northern Minnesota
    MS-Off Ver
    Office 2007
    Posts
    9

    Iteratively delete rows from a spreadsheet

    I have a very large spreadsheet (about 50,000 rows, and to CM of columns) with blocks of data 20 rows high (rows 1-20 are from Building A, rows 21-40 are from Building B, etc). However, not every row in each block of 20 has information in it - some are just placeholders. For example, some blocks may have rows 1-18 filled with data while other blocks may have only 1-6 filled with data.

    I am interested in programming a macro that would delete the placeholder rows out of the spreadsheet based on a certain criteria. This would probably halve the size of my spreadsheet.

    In faux-code:

    For row i
    i = 1 to 50,000
    If Column B = #NA
    Delete row i


    Is this something that can be done with a macro, or do I need to go through all of these rows by hand? Obviously, I haven't programmed macros before (I've taken code and run it), but I've programmed in other languages (Java, C#). Could someone point me in the right direction?

    Thanks,

    V. Hagberg
    Last edited by wruwtrix; 04-14-2009 at 10:16 PM.

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