+ Reply to Thread
Results 1 to 7 of 7

Check column for empty rows, delete rows shift cells up?

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

    Check column for empty rows, delete rows shift cells up?

    Hello!

    Please Login or Register  to view this content.
    In this code, column B is checked entirelly, but how to check only 100 rows not 1048576 of it? Code is slow.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Check column for empty rows, delete rows shift cells up?

    You have a loop here to delete empty rows:-

    Please Login or Register  to view this content.
    This does the same without looping:-

    Please Login or Register  to view this content.

    You use this form of code often:-

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 10-04-2017 at 01:08 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Check column for empty rows, delete rows shift cells up?

    You use this form of code often:=

    Please Login or Register  to view this content.
    This form achieves the same purpose without moving between sheets:-

    Please Login or Register  to view this content.

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

    Re: Check column for empty rows, delete rows shift cells up?

    Because i'm f* novice. Three years, i still don't get VBA

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

    Re: Check column for empty rows, delete rows shift cells up?

    Quote Originally Posted by mehmetcik View Post
    You have a loop here to delete empty rows:-

    Please Login or Register  to view this content.
    This does the same without looping:-

    Please Login or Register  to view this content.
    I think it is the same, it will delete all empty space below, let's say last populated cell B100, B100:B1046576, it's slow no mather how.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: Check column for empty rows, delete rows shift cells up?

    Avoid using Select, Selection.

    Please Login or Register  to view this content.
    Last edited by bakerman2; 10-06-2017 at 12:22 PM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

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

    Re: Check column for empty rows, delete rows shift cells up?

    Quote Originally Posted by mehmetcik View Post
    You use this form of code often:=

    Please Login or Register  to view this content.
    This form achieves the same purpose without moving between sheets:-

    Please Login or Register  to view this content.
    Not working at all, Sheets("...IZVJEŠTAJ").Range("B30:J51").Value will be cleared, so...It's sheet called "...IZVJEŠTAJ" Report, sheet "...._SVE" is sort of backup.

+ 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. [SOLVED] How can I delete rows that have empty cells?
    By Cam CDB in forum Excel General
    Replies: 5
    Last Post: 12-04-2015, 03:09 PM
  2. Delete or shift empty cells up as i bring formulae down Column.
    By mijh in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-02-2015, 11:11 AM
  3. Delete rows with empty cells
    By movia in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-24-2015, 09:32 AM
  4. Delete empty rows above and below in a column
    By emymeeky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-05-2014, 01:00 PM
  5. [SOLVED] Delete blank rows between data rows, shift rows up, then repeat
    By excelactuary in forum Excel General
    Replies: 2
    Last Post: 03-11-2013, 11:53 AM
  6. VBA Check number of empty rows after a character and add or delete if necessary
    By frjcd in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-08-2012, 06:55 PM
  7. How do I delete empty rows in column A?
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2011, 09:13 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