+ Reply to Thread
Results 1 to 12 of 12

Delete columns & Row based on criteria VBA code needed

  1. #1
    Registered User
    Join Date
    07-28-2014
    Location
    Boston
    MS-Off Ver
    2013
    Posts
    6

    Delete columns & Row based on criteria VBA code needed

    I need to have a Macro that will delete a row if the cell value is less than 11 and also delete column if the names are Provider,Mngd balance, Hold Status, K?,Enrollment Date. This needs to Delete Rows & Columns.jpg

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Delete columns & Row based on criteria VBA code needed

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Delete columns & Row based on criteria VBA code needed

    For deleting rows...

    Try this..

    Please Login or Register  to view this content.
    Don't forget to click *

  4. #4
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Delete columns & Row based on criteria VBA code needed

    after that try this for deleting columns..

    Please Login or Register  to view this content.

    Don't forget to click *

  5. #5
    Registered User
    Join Date
    07-28-2014
    Location
    Boston
    MS-Off Ver
    2013
    Posts
    6

    Re: Delete columns & Row based on criteria VBA code needed

    Hi John,
    The code works. Now I need to have it work on the other 8 sheets in the workbook. Thanks for the help!!!

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Delete columns & Row based on criteria VBA code needed

    You're welcome. Does this help for the other worksheets?

    Please Login or Register  to view this content.

  7. #7
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Delete columns & Row based on criteria VBA code needed

    Try this..
    Garys code revised....

    Please Login or Register  to view this content.
    Don't forget to click *

  8. #8
    Registered User
    Join Date
    07-28-2014
    Location
    Boston
    MS-Off Ver
    2013
    Posts
    6

    Re: Delete columns & Row based on criteria VBA code needed

    Hi John,
    This works on all sheets except it doesn't remove the columns with Hold Status in column 8 and Enrolment Date in column 12 for some reason.
    Column 3 Provider, Column 6 Mngd balance and column 10 K? work fine. Any idea's ?
    Gary B

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Delete columns & Row based on criteria VBA code needed

    Well for Column 12, how do you spell Enrollment Date? Check for spelling and leading and trailing spaces in your headers.

  10. #10
    Registered User
    Join Date
    07-28-2014
    Location
    Boston
    MS-Off Ver
    2013
    Posts
    6

    Re: Delete columns & Row based on criteria VBA code needed

    I seplled Enrollment on the workbook correctly and it's correct in the code.

  11. #11
    Registered User
    Join Date
    07-28-2014
    Location
    Boston
    MS-Off Ver
    2013
    Posts
    6

    Re: Delete columns & Row based on criteria VBA code needed

    Sorry, I mean I spelled Enrollment correctly, no leading spaces or trailing spaces.

  12. #12
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Delete columns & Row based on criteria VBA code needed

    Try:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA code needed to copy rows based on mulitple wildcard criteria
    By derryt in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-11-2014, 08:56 AM
  2. [SOLVED] Delete Rows based on criteria in two columns
    By KSSLR in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-30-2013, 04:39 PM
  3. delete row based on criteria of value in two columns
    By tomham in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 09-17-2012, 04:49 AM
  4. VBA Code to delete the contents based on Color - Help needed
    By ragavendraph in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-06-2012, 11:06 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