+ Reply to Thread
Results 1 to 2 of 2

Need help to auto delete 4 of every 5 rows

  1. #1
    scratching my head
    Guest

    Need help to auto delete 4 of every 5 rows

    I have a spreadsheet in which 4 of every 5 Rows need to be deleted. ie: Row
    1 is good, Row 6 is good, Row 11 is good, Row 16 is good, etc. I need to
    delete Rows 2-5, 7-10, 12-15, etc. I would prefer to set a variable in the
    macro to tell it how many sets of 4 consecutive rows I need deleted (with one
    good row between each bad set of 4). The rows that need to be deleted are not
    entirely blank, some of the cells have data (not needed) but there are a few
    rows that are entirely blank. It needs to delete the rows irreguardless of
    any data in that row. Help is appreciated as I am not a programmer but you
    guys are really good.

    OR

    Every 5th cell in column A has data. I need to delete all ROWS that have no
    data in COLUMN A(even if it is a "space" that was used to delete previous
    data) in column A. How would it know when it reached the end of the data and
    continue to delete the balance of the blank spreadsheet?

    Thanks
    Danny



  2. #2
    Forum Contributor
    Join Date
    11-16-2004
    Posts
    282
    Hi Danny,

    Here are two versions that will do what you need...

    This version prompts the user to enter the number of sets to delete:
    Please Login or Register  to view this content.
    This version doesn't prompt the user; it determines the number based on the range of data in the spreadsheet:
    Please Login or Register  to view this content.
    Hope this helps,
    theDude

+ 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