+ Reply to Thread
Results 1 to 5 of 5

Find last empty cell from range, then delete rows?

  1. #1
    Forum Contributor
    Join Date
    11-26-2014
    Location
    Bosnia&Herzegovina
    MS-Off Ver
    Office2013
    Posts
    281

    Find last empty cell from range, then delete rows?

    Please, dear Excel, how to find last empty cell or last NOT empty cell from three columns, then delete rows? Using VBA.


    john MArk Julia
    Johnson john Mark
    John












    How to delete empty rows from third column to down, actually I have B2:B15, K2:K15, T2:T15, I need to delete rows from 5:15. But sometimes there will be more data in B or K column, I need to find last non empty cell in these ranges and then delete rows:15
    Thank you in advance!




    Please Login or Register  to view this content.
    This code not working, it watches only B, and then deletes all data from rows
    Sorry bad english
    Also asked on OzGrid http://www.ozgrid.com/forum/showthre...=201011&page=2
    , MrExcel, http://www.mrexcel.com/forum/excel-q...lete-rows.html

    MicrosoftCommunity... http://answers.microsoft.com/en-us/o...=1473072648304
    Last edited by alansidman; 09-05-2016 at 04:07 PM. Reason: code tags added

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find last empty cell from range, then delete rows?

    Hi,

    Can I suggest you upload the workbook and clearly explain which rows you want to delete and why you choose them. I find your first sentence confusing.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    11-26-2014
    Location
    Bosnia&Herzegovina
    MS-Off Ver
    Office2013
    Posts
    281

    Re: Find last empty cell from range, then delete rows?

    B2:B15, K2:K15, T2:T15 these are ranges. Always.
    I need to find last populated cell in these three ranges, and then delete empty rows.
    Lets say I have B2:B5 values, K2:K4 also cell populated, and T2:T7 populated. I need VBA code to find that last populated cell(T7) and then delete all empty rows to row 15 (empty rows(cells) from 8:15).
    Thank You in advance, thanks very mach. Sorry bad englishh.

    Ps And there will be time when all cells will not be empty, and also when all ranges will be empty. Thank you.
    Last edited by B.W.B.; 09-03-2016 at 04:56 AM.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Find last empty cell from range, then delete rows?

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Contributor
    Join Date
    11-26-2014
    Location
    Bosnia&Herzegovina
    MS-Off Ver
    Office2013
    Posts
    281

    Re: Find last empty cell from range, then delete rows?

    Problem solved thanks to rollis13, OzGrid.com: http://www.ozgrid.com/forum/showthre...=201011&page=2
    Thanks excelforum, sorry for /CODE tags!
    Please, check my other posts(questions). Thank you all!

+ 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. delete empty rows from another sheet range
    By missy22 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2015, 02:04 PM
  2. [SOLVED] Delete rows if cell is empty
    By xlssw in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2013, 04:49 PM
  3. [SOLVED] Delete empty rows in range after last used row
    By crakter in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2013, 12:30 PM
  4. [SOLVED] Find empty cell in column and delete that row
    By xbr088 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-26-2013, 03:35 AM
  5. find <> empty cell in range, delete entire row
    By Shell_ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2011, 12:36 PM
  6. Find empty columns, rows and delete
    By ebe in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-27-2010, 10:00 AM
  7. Find last row of data and delete empty rows
    By Pat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-18-2005, 10:06 AM

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