+ Reply to Thread
Results 1 to 7 of 7

Selecting Blank cells and deleting those cells and the 2 cells directly above each Blank

  1. #1
    Forum Contributor
    Join Date
    11-20-2009
    Location
    Melbourne
    MS-Off Ver
    Excel 365
    Posts
    263

    Selecting Blank cells and deleting those cells and the 2 cells directly above each Blank

    In the attached spreadsheet, I use the Find function to select all Blank cells in Row 3.
    Is there a way that once they are all selected, I can deleted the 2 cells directly above each Blank one.
    The end result in the example being Rows 5-7
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Selecting Blank cells and deleting those cells and the 2 cells directly above each Bla

    Do you mean delete all columns: E to KK, since E2 to KK2 are blank
    ?
    Quang PT

  3. #3
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    UK
    MS-Off Ver
    365
    Posts
    518

    Re: Selecting Blank cells and deleting those cells and the 2 cells directly above each Bla

    Depends on how automated this shall be.

    Here with a few key strokes:
    - Select any cell in row 3
    - Press Shift+Space to select the entire row
    - Press F5, Alt+S, K, Enter to select all empty cells in row 3
    - Press Alt+-, C, Enter to delete the entire column (or move up manually with Shift Key by two rows and then delete and shift cells left)

  4. #4
    Forum Contributor
    Join Date
    11-20-2009
    Location
    Melbourne
    MS-Off Ver
    Excel 365
    Posts
    263

    Re: Selecting Blank cells and deleting those cells and the 2 cells directly above each Bla

    Yes I did mean that. I don't need the header rows if the cell is blank below them, but I do need the headers if the cell is populated.
    What I haven't shown correctly is that there are blank cells after the populated cells also. I have added a new example to show what I mean.
    Attached Files Attached Files
    Last edited by coach.32; 04-26-2024 at 05:50 PM. Reason: Need to clarify more

  5. #5
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,469

    Re: Selecting Blank cells and deleting those cells and the 2 cells directly above each Bla

    pls try this code

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    11-20-2009
    Location
    Melbourne
    MS-Off Ver
    Excel 365
    Posts
    263

    Re: Selecting Blank cells and deleting those cells and the 2 cells directly above each Bla

    Perfect. Thank you so much.

  7. #7
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,469

    Re: Selecting Blank cells and deleting those cells and the 2 cells directly above each Bla

    coach.32 You're Welcome. Glad to help . Thank You for the feedback and rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 12
    Last Post: 05-29-2018, 05:11 PM
  2. Replies: 3
    Last Post: 07-24-2017, 01:41 PM
  3. Count blank cells in a range and contiguous blank cells also as single cells! Tricky One!
    By SebastianColombia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-31-2015, 02:32 PM
  4. [SOLVED] Macro to fill blank cells in column A based on non-blank cells
    By ktalamantez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2014, 02:47 PM
  5. Fill blank cells with data directly above that blank cell
    By gibson2503 in forum Excel General
    Replies: 3
    Last Post: 06-05-2013, 10:07 AM
  6. Replies: 4
    Last Post: 01-31-2012, 01:08 PM
  7. Advanced filter with blank cells / Dynamic named range with blank cells
    By Jason_2112 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-15-2010, 12:06 PM

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