+ Reply to Thread
Results 1 to 2 of 2

How to delete rows of data based on cell values in VB?

  1. #1
    Registered User
    Join Date
    10-17-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    3

    How to delete rows of data based on cell values in VB?

    Hi all,
    I have a block of data in columns AH to AM.

    What I want to do is delete any rows which contain a "0" as the cell value in column AK, with VBA.

    Note I don't want to delete the entire row, just the selection across AH to AM (similar to "shift cells up" type manual operation).

    Any ideas?

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: How to delete rows of data based on cell values in VB?

    Hi Drx,

    The following macro will delete columns AH:AM for any row where AK has the value 0. (e.g. Deletes AH3:AM3, shifting the cells below that up a row)

    Hope it helps!
    Please Login or Register  to view this content.

+ Reply to Thread

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