+ Reply to Thread
Results 1 to 4 of 4

Summary Sheet Code creating additional blank rows

  1. #1
    Forum Contributor
    Join Date
    02-23-2007
    Location
    England
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2208 Build 16.0.15601.20072) 64-bit
    Posts
    102

    Summary Sheet Code creating additional blank rows

    Good morning All

    I have a workbook that I created which loops through each sheet and extracts my required data and places on the front summary sheet. I do apologise as the code I have written is primitive and laborious (happy to receive a cleaner simplified version :-) ).

    Anyway the workbook operates almost as I require, but poses the following issues:

    1. Upon adding the next sheet details the code keeps adding additional blank rows which increase incrementally. I believe this is something to do with the 'Counter +1' command but for the life of me I cannot resolve without messing up the sheet

    2. If I have a worksheet that only have one entry in it, the code falls over (feel free to copy a sheet, rename it and only have one line of data and run the code to see this error). I am not skilled enough to resolve and have already spent 3 hours on this with no avail.

    Here is my code (plus workbook attached)

    Please Login or Register  to view this content.
    Please could somebody assist?

    Many thanks
    G1
    Attached Files Attached Files

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: Summary Sheet Code creating additional blank rows

    Rule No 1 in excel....Avoid merged cells...Just cause havoc...

    Anyway, this solves...

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    02-23-2007
    Location
    England
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2208 Build 16.0.15601.20072) 64-bit
    Posts
    102

    Re: Summary Sheet Code creating additional blank rows

    Good afternoon Sintek

    OH MY WORD, How did you to that so quickly and your code runs in a fraction of the time mine did. Thank you so much as it does everything I was looking for. The fear I had with mine was that as I add more sheets, the code will run slower and slower, but yours appears to not have that issue, so thank you so much. I have been using Excel for many years but as I have never really concentrated in VBA, I have always stayed at the same novice (code stealing) level. I need to invest time to learn as although technology moves on, everyone needs spreadsheets so will give job longevity I am sure :-).

    May I ask why merge cells is such an issue? Just means that I will need to manually merge cells on the summary, but considering the time your code has saved me, it's a small price to pay.

    Many thanks again Sintek
    Magic

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: Summary Sheet Code creating additional blank rows

    How did you to that so quickly
    Had a similar request a couple of days ago...
    why merge cells is such an issue?
    Just causes havoc...There are alternatives that have the same effect...
    https://www.excelsupersite.com/do-yo...to-merge-that/
    https://edu.gcfglobal.org/en/excel-t...rging-cells/1/
    https://accessanalytic.com.au/stop-merging-cells/

    Thanks for 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. code to copy first rows and sheet titles from separate csv files into summary sheet
    By freshmint in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-08-2021, 06:10 AM
  2. [SOLVED] Code Optimization - Copy cells from one sheet to another - remove blank rows
    By snuffnchess in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-15-2019, 07:52 AM
  3. [SOLVED] Need help with creating VB code for moving rows to different sheet based on cell valu
    By mj1003 in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 05-29-2018, 05:57 PM
  4. Replies: 2
    Last Post: 12-08-2014, 03:16 PM
  5. Changing code from deleting rows to cut/paste rows into another sheet and delete blank row
    By kmarshall6576 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-18-2013, 01:54 AM
  6. Replies: 0
    Last Post: 12-20-2012, 10:51 PM
  7. Summary sheet not displaying blank rows in column
    By excel_lover in forum Excel General
    Replies: 1
    Last Post: 11-14-2008, 09:05 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