+ Reply to Thread
Results 1 to 3 of 3

Different range of cells to clear

  1. #1
    Forum Contributor
    Join Date
    05-04-2015
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    106

    Different range of cells to clear

    I have a data table A1:R70.

    Each day it will have a different amount of data in it.

    For instance, the first day only A1:R41 will be filled. The next day, only A1:R60 and so on.

    What I want to do is for each day, have a macro that will clear out the data in the empty cells below the filled cells.

    So on the first day, A42:R70 will be cleared. The second day A61:R70 will be cleared.

    I know how to select a static range by "Range(A1:R70).Select".

    What do I use in the macro for this changing range?

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Different range of cells to clear

    I recommend you first find the last row +1 and then use a line to clear the remaining.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-04-2015
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    106

    Re: Different range of cells to clear

    That did it!

+ 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] Macro to clear cells in range & move up if certain cells meet criteria
    By samder68 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-09-2016, 10:52 PM
  2. Clear range based on cell value - clearing cells out of specified range
    By CADiphile in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-15-2013, 02:48 PM
  3. [SOLVED] VBA Clear Cells for one range if cell in other range is blank
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-03-2013, 06:23 PM
  4. [SOLVED] Macro needed to clear cells in range based on value of cells in another range
    By msmith7113 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-05-2013, 12:32 AM
  5. Fast way to clear a range of cells
    By Phil_V in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-11-2012, 07:10 AM
  6. Clear a range of cells
    By grceiley in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-04-2010, 12:05 PM
  7. Clear a range of cells
    By Joe@excel in forum Excel General
    Replies: 6
    Last Post: 11-25-2005, 02:28 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