+ Reply to Thread
Results 1 to 2 of 2

Delete Rows to reduce file size Macro

  1. #1
    Forum Contributor
    Join Date
    08-15-2006
    Location
    USA
    MS-Off Ver
    Office 365, 64 bit
    Posts
    371

    Delete Rows to reduce file size Macro

    I'm currently using the code below to delete rows that are not needed for our intended metrics. When I dump the raw data (up to 6k rows), there is a column that has null data up to exceeding row 8100 in column D. Therefore, the code below only delete the rows below 8100 (or whatever row the null data ends up to any particular day). What I want is to have the rows deleted below the starting empty cell in column B... So if in column B the data ends in row 5223, than delate rows below that whereas reducing the size of the sheet and file... Unless there is another better way to do this without deleting the relevant data rows... thx



    With ActiveSheet
    Range(.Cells(.Rows.Count, 4).End(xlUp).Offset(1,0), .Rows(.Rows.Count)).Delete
    End With

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Delete Rows to reduce file size Macro

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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: 9
    Last Post: 05-18-2023, 07:18 PM
  2. [SOLVED] Reduce the file size via MACRO
    By rz6657 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-28-2016, 06:00 AM
  3. Reduce file size
    By Bluetube in forum Excel General
    Replies: 2
    Last Post: 04-08-2016, 01:13 PM
  4. Replies: 1
    Last Post: 12-17-2013, 03:18 PM
  5. How to reduce the array size without delete content
    By cgkmal in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-20-2013, 02:14 AM
  6. How to reduce File Size
    By santoshsapre in forum Excel General
    Replies: 3
    Last Post: 06-25-2012, 09:06 AM
  7. Delete multiple rows to reduce size of large spreadsheet
    By The Geologist in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-02-2011, 01:54 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