+ Reply to Thread
Results 1 to 3 of 3

Deleting multiple cells

  1. #1
    Registered User
    Join Date
    03-24-2011
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Deleting multiple cells

    I've found the following code on a website however I need it to delete the cells with x's in from columns Z through AI. The cells should be deleted and shifted up leaving a block of cells with numbers in the top rows.
    I've attached the spreadsheet in question, data is in Z5:AI317 in this sheet and Z5:AK317 in another.

    The code below works for one column, z, but I can't figure out how to modify it to include more columns. The line that I've been playing with is

    With .Cells(Lrow, "z")

    I've attempted to replace it with range or declare the range as a variable but then I get errors in other parts of the code. The full code is below.

    Thanks for you help.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Exphys; 07-30-2012 at 09:57 AM.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Deleting multiple cells

    Try this

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-24-2011
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Deleting multiple cells

    Thankyou that's perfect.

+ 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