+ Reply to Thread
Results 1 to 4 of 4

Code to delete partial rows based on blank cells

  1. #1
    Valued Forum Contributor scaffdog845's Avatar
    Join Date
    02-01-2008
    Location
    Aston, PA. USA.
    MS-Off Ver
    Microsoft 365
    Posts
    373

    Code to delete partial rows based on blank cells

    Morning all,

    I was looking for a little help to automate a pre-Access dump with a Workbook.

    The WB has three sheets; Scheduled Work, Completed Work and Additional Work.

    On "Scheduled Work", for each row where "A" in that row is blank, I would like to have the cells in A:K deleted and the cells below shifted up.

    On "Completed Work" and "Additional Work"", for each row where "A" in that row is blank, I would like to have the cells in A:N deleted and the cells below shifted up.

    As always, the help is greatly appreciated.
    Click here to read the Forum Rules
    Whatever it is in life you decide to go after, go after with great ferocity.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Code to delete partial rows based on blank cells

    Hi,

    This code will delete rows A through K on the active sheet where the cell in column A is empty.

    Please Login or Register  to view this content.
    This code will delete rows A through N on the active sheet where the cell in column A is empty.

    Please Login or Register  to view this content.
    Adjust ranges to suit.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Valued Forum Contributor scaffdog845's Avatar
    Join Date
    02-01-2008
    Location
    Aston, PA. USA.
    MS-Off Ver
    Microsoft 365
    Posts
    373

    Re: Code to delete partial rows based on blank cells

    Sweep,

    I've tried this code as both stand alone modules and incorporating into existing macros. Either way it seems to send excel into an endless loop at which point only ending the process will stop it.

    Any ides?

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Code to delete partial rows based on blank cells

    Sorry for the delay in responding - both bits of code execute very quickly for me. Anyone else?

+ 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