+ Reply to Thread
Results 1 to 10 of 10

Macro to delete blank cells and unwanted cells in a particular column

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    12

    Macro to delete blank cells and unwanted cells in a particular column

    Hi Guys -

    Could someone help me out, how to delete blank cells and unwanted cells in a particular column.

    On the attached file, I want to retain entire row data between "Accept" & "Total Accept*" on column "B" wherever it reflects.
    And to delete the rest of the data.

    Any help would be much appreciated.

    Many thanks in advance.

    Regards,
    Nikki
    Attached Files Attached Files

  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: Macro to delete blank cells and unwanted cells in a particular column

    Hi Nikki,

    See whether this is what you want:

    Please Login or Register  to view this content.
    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
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Macro to delete blank cells and unwanted cells in a particular column

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-30-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro to delete blank cells and unwanted cells in a particular column

    Hi,

    Thank you so much for your help

    The Macro which you have provided is perfect, but all i wanted is to retain the data between "Accept" & "Total Accept*" on column "B" even if it reflects multiple times.

    Is there any way?

    Once again thank you.

  5. #5
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Macro to delete blank cells and unwanted cells in a particular column

    Try this,

    Please Login or Register  to view this content.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

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

    Re: Macro to delete blank cells and unwanted cells in a particular column

    Hi Nikki,

    Are you expecting more than one occurrence of the "Accept" block? If so we could delete the other rows rather than just erase them.

  7. #7
    Registered User
    Join Date
    10-30-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro to delete blank cells and unwanted cells in a particular column

    Yes, i am expecting more than one occurrence of "Accept" block.
    It would be much better if we delete the other unwanted rows on the same sheet.

    @ Dave - Your macro works good, but it copies the required data onto another sheet. I want the data to be retained on the same sheet and to delete the other unwanted rows.

    Thank you guys for your great help

    Nikki

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

    Re: Macro to delete blank cells and unwanted cells in a particular column

    Hi Nikki,

    Try this:

    Please Login or Register  to view this content.
    Last edited by xladept; 11-09-2012 at 03:52 PM.

  9. #9
    Registered User
    Join Date
    10-30-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Macro to delete blank cells and unwanted cells in a particular column

    Its working perfect now. This is what all i wanted.
    Thank you so much for your help

    Thanks everyone!!!

    Nikki

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

    Re: Macro to delete blank cells and unwanted cells in a particular column

    You're welcome!

+ 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