+ Reply to Thread
Results 1 to 3 of 3

Create a macro to delete rows if column d =2529-3 for an entire sheet

  1. #1
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Create a macro to delete rows if column d =2529-3 for an entire sheet

    I need to create a macro to run if in column D equals "2529-3" or "other" to delete those rows. The will be used for an entire sheet. For some reason I get the error subscript is out of range for the one I tried to write. TIA.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Create a macro to delete rows if column d =2529-3 for an entire sheet

    Subscript error means you're trying to access named object that cannot be located by that name. For instance if your code were looking for a "Sheet 1" but it was really called "Sheet1" they would not match and give that error. Look in your code for named objects and see if you can spot the typo.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

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

    Re: Create a macro to delete rows if column d =2529-3 for an entire sheet

    Maybe:

    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. [SOLVED] Delete both Original and duplicate rows off data in 1 column for entire sheet
    By Caraexcel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-01-2014, 01:33 AM
  2. Replies: 4
    Last Post: 02-14-2014, 08:11 AM
  3. Replies: 3
    Last Post: 04-19-2012, 10:45 AM
  4. [SOLVED] create macro - delete all rows with zero in column L
    By Johnny in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-15-2006, 05:15 AM
  5. Delete entire rows where there is a blank in column A
    By Chris Hankin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-11-2006, 05:00 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