+ Reply to Thread
Results 1 to 11 of 11

How can I use VBA to delete cells that don't have content in column B for rows 4 and below

  1. #1
    Registered User
    Join Date
    02-09-2013
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    13

    How can I use VBA to delete cells that don't have content in column B for rows 4 and below

    How can I use VBA to delete rows that don't have content in column B(applying to rows 4 and below)?

    Sorry, in the title I meant to say rows, not cells.
    Last edited by smith310; 02-13-2013 at 09:19 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How can I use VBA to delete cells that don't have content in column B for rows 4 and b

    Please Login or Register  to view this content.
    where r is the row number (index)
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    02-09-2013
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: How can I use VBA to delete cells that don't have content in column B for rows 4 and b

    This did not work. An error came up.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How can I use VBA to delete cells that don't have content in column B for rows 4 and b

    Can you post a sample book??

  5. #5
    Registered User
    Join Date
    02-09-2013
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: How can I use VBA to delete cells that don't have content in column B for rows 4 and b

    Yes. Here it is. I really appreciate your help!
    I hope I uploaded it correctly. What I want is for the rows that only have the time info to be removed.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: How can I use VBA to delete cells that don't have content in column B for rows 4 and b

    HI Smith310. You can try this one. It will delete the complete row if there is any blank in row b4 and below. Hope i understood what you wanted correct.

    Please Login or Register  to view this content.
    SIncerely Abjac
    Last edited by abjac; 02-14-2013 at 12:21 AM.

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How can I use VBA to delete cells that don't have content in column B for rows 4 and b

    Hi Smith,

    Here's my code:

    Please Login or Register  to view this content.
    Last edited by xladept; 02-14-2013 at 12:52 AM.

  8. #8
    Registered User
    Join Date
    02-09-2013
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: How can I use VBA to delete cells that don't have content in column B for rows 4 and b

    Thank you both so much! it worked!!!

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How can I use VBA to delete cells that don't have content in column B for rows 4 and b

    You're welcome!

  10. #10
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: How can I use VBA to delete cells that don't have content in column B for rows 4 and b

    Thats good. Your welcome

  11. #11
    Registered User
    Join Date
    10-01-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: How can I use VBA to delete cells that don't have content in column B for rows 4 and b

    Remember to set as "Solved"

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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