+ Reply to Thread
Results 1 to 4 of 4

Identifying macro starting point & combining macros

  1. #1
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Identifying macro starting point & combining macros

    I am using the following code to identify any blank rows in a sheet and delete them:

    Please Login or Register  to view this content.
    Simple and works perfectly.

    Then I use the following code to look at Column A and if it finds any cells that look blank, then delete that row.

    Please Login or Register  to view this content.
    Then I adjust the code to look into "E:E".

    The problems I am having are as follows:

    1. How do I code it so that it only starts deleting after a certain row, in this case ROW2

    2. Can I combine these codes to make one macro to do all the steps I need?

    Ive attached a spreadsheet showing a before and after example.
    Attached Files Attached Files
    Last edited by dagindi; 11-25-2009 at 10:32 AM. Reason: Title change

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: Identifying macro starting point & combining macros

    Hi dagindi,

    I may be over simplifying things here, but it seems that you only want rows left (not deleted) where "Sales" is not in the applicable row in column C. That said, see how this goes - make sure you run the macro on a copy of the relevant tab first:

    Please Login or Register  to view this content.
    HTH

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Identifying macro starting point & combining macros

    Hi dagindi
    To do this
    Please Login or Register  to view this content.
    I believe you need to change this line of code from
    Please Login or Register  to view this content.
    to this
    Please Login or Register  to view this content.
    Try this and see if it works for you.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Re: Identifying macro starting point & combining macros

    Trebor76 & jaslake,

    The coding you provided works perfect and I can see exactly where I need to change the variables so that I can apply this to other worksheets in the future.

    Thank you both for your help!

    I wish you both a Happy Thanksgiving!

    David

+ 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