+ Reply to Thread
Results 1 to 3 of 3

clear cells below last row with a value

  1. #1
    Registered User
    Join Date
    08-31-2011
    Location
    New York, New York
    MS-Off Ver
    Excel 2003
    Posts
    51

    clear cells below last row with a value

    So I have a macro that enters a formula into every cell in the range, A51:N147. The formulas perform a logical test and always result in a value except when it gets to the end and then from that end point all other cells/rows below it result in "" or blank.

    So for example if you run the macro the formula is entered into every cell from A51:N147, but below row 80 they might be all blank. However, even though they are blank, they are not treated as pure empty cells.

    I would like a separate macro to basically find the last row in that range that has a real value, and clear the contents of all rows below it so they are truly empty cells.


    Thanks for any help you can offer.

  2. #2
    Valued Forum Contributor
    Join Date
    10-05-2014
    Location
    Regina, SK Canada
    MS-Off Ver
    Excel for Mac 11
    Posts
    330

    Re: clear cells below last row with a value

    Here are 2 solutions; a short specific one for your range and a more general one.

    Version 1:
    Please Login or Register  to view this content.

    Version 2:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-31-2011
    Location
    New York, New York
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: clear cells below last row with a value

    Perfect! Thank you so much!

+ 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. Macro - find cells row by row, clear contents if certain value in cells
    By astrbac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-18-2014, 05:34 AM
  2. [SOLVED] Macro to clear certain cells in the row if first cells date is in the past
    By davorin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-09-2014, 04:19 AM
  3. [SOLVED] Clear various cells in worksheet when changing related cells
    By Corneli in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-24-2012, 06:36 AM
  4. Clear contents of cells based on the values of other cells
    By macquhele in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-29-2011, 08:49 AM
  5. Clear contents of cells that do not contain specific text, sort cells that do
    By feckless.lout in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2010, 01:41 AM
  6. Clear contents of all unlocked cells (many are merged cells)
    By 2funny4words in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-08-2009, 09:21 AM
  7. [SOLVED] clear contents cells of unprotected cells
    By Ed in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-12-2006, 02:15 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