1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Deleting rows based on empty cell.

Discussion in 'Business Applications' started by Moll45, Jul 20, 2009.

Thread Status:
Not open for further replies.
  1. Moll45

    Moll45 Thread Starter

    Joined:
    Jun 2, 2003
    Messages:
    94
    You must be bored with this question cos I've seen lots of them, however I can't seem to fathom out what to do..........

    I've got a block of data within a spreadsheet 4 rows always in the same place.

    How do I put into code:-

    If column d43:e46 is blank delete rows 43 - 46 if not ignore it.

    As I said I've tried a few things and it will delete the four rows regardless of them being empty of not.

    Can someone help please.

    Many thanks,

    Moll
     
  2. Moll45

    Moll45 Thread Starter

    Joined:
    Jun 2, 2003
    Messages:
    94
    Is there anybody there? - Help! :(
     
  3. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Hi Moll. :)

    "If column d43:e46 ..." ; D+E = 2 columns, so ... :confused:

    What things did you try?

    If WorksheetFunction.CountBlank(Range("D43:D46")) = 4 Then
    Range("43:46").Delete
    End If
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/844789

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice