Results 1 to 18 of 18

If one cell in line turn empty then entire line turns empty

Threaded View

  1. #2
    Forum Contributor
    Join Date
    07-24-2012
    Location
    Denver, CO
    MS-Off Ver
    365
    Posts
    230

    Re: If one cell in line turn empty then entire line turns empty

    You can run a loop that checksfor empty cells and then deletes the entire row. It might look something like this:
    Sub clearlines()
    
    Dim empty as Range
    
    For Each empty in Range("A1:A2")
    
    If empty.FormulaR1C1 = "" Then empty.EntireRow.ClearContents
    
    Next empty
    
    End Sub
    Last edited by LaffyAffy13; 07-18-2013 at 11:09 AM. Reason: Changed info to "Clear Contents" instead of "Delete"
    ~~LaffyAffy13~~

    If I have helped you solve your problem, please be sure to click at the bottom left of my post.

    Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Check range A10 to A45 and if cell not empty then same line in B must have value
    By CAVA30 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 03-08-2013, 09:25 PM
  2. Need to delete the empty line
    By hisham_a_j in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-28-2012, 05:22 AM
  3. Paste in next empty line
    By Doolafs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-05-2010, 07:24 AM
  4. Line chart-lot of empty cell
    By missing in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-14-2006, 06:42 AM
  5. If value in column is yes; entire line turns red
    By Geert_Pick in forum Excel General
    Replies: 2
    Last Post: 03-03-2006, 03:50 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