+ Reply to Thread
Results 1 to 10 of 10

Macro to delete certain rows of data within a table

  1. #1
    Registered User
    Join Date
    06-26-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    37

    Macro to delete certain rows of data within a table

    Hello,

    I've got a lot of great help and advice from this forum in the past but have hit a brick wall trying to create this macro myself. The example attached details what I want the macro to do and contains some sample data to test.

    Basically this button would save a lot of time as the proces is currently done manually.

    If somebody could take a quick look it would be greatly appreciated, I don't think it will be difficult for an excel guru to crack.

    Extract Rec.xlsx

    p's apologies to the moderators for the other random thread I started in error and the sloppy thread title.

    Many Thanks

    Andrew
    Last edited by Andrew E Smith; 07-12-2014 at 12:21 PM. Reason: attachment not working

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Bespoke Button/ Macro required. Any help hugely appreciated.

    The file is not downloading correctly for me.

    Can you post the VBA code to the forum aas well as try to reattach it?
    Also where is it not working correctly?
    Do you know how to walk through code instead of just running it?
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Registered User
    Join Date
    06-26-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    37

    Re: Bespoke Button/ Macro required. Any help hugely appreciated.

    Thanks for your quick response I'm going to try and re-attach it when I get on my home pc as my one it work is disgustingly slow

  4. #4
    Registered User
    Join Date
    06-26-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    37

    Re: Bespoke Button/ Macro required. Any help hugely appreciated.

    Not sure what the issue was but this is fixed now, if you still have time to take a look that would be great. Thanks

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Bespoke Button/ Macro required. Any help hugely appreciated.

    Hi, Andrew,

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  6. #6
    Registered User
    Join Date
    06-26-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    37

    Re: Macro to delete certain rows of data within a table

    Hi Holger, is this ok now? Is this thread locked/ do I need to start again? Thanks
    Last edited by Andrew E Smith; 07-10-2014 at 07:25 AM.

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Macro to delete certain rows of data within a table

    Hi, Andrew,

    please give this macro a try:
    Please Login or Register  to view this content.
    It should be run on a copy with the data of Pre.

    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button
    HTH,
    Holger

  8. #8
    Registered User
    Join Date
    06-26-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    37

    Re: Macro to delete certain rows of data within a table

    Thanks for the reply Holger. Unfortunately I can't click 'Run' as the option is greyed out?

  9. #9
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Macro to delete certain rows of data within a table

    Hi, Andrew,

    could you plesae give us an information about the security level for your Office (assuming you´re using 2003)? If it´s put to high no macro will be allowed to run so you would need to switch it to leave you the option to decide whether or not to run any macros in the workbook, you should never consider the option to run any macros without information.

    Ciao,
    Holger

  10. #10
    Registered User
    Join Date
    06-26-2012
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    37

    Re: Macro to delete certain rows of data within a table

    Good call thats working now! The macro does exactly what is required of it. Thanks for your help, I appreciate it, this really is a fantastic forum.

+ 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. Macro Calendar Button Required
    By Holly.Pittam in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-16-2014, 12:30 PM
  2. [SOLVED] macro required for search button
    By shaileshgavanang in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-23-2013, 10:40 PM
  3. Sort Button - Macro required
    By bengaluru in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-09-2011, 09:53 AM
  4. Excel 2003 Macro Converted to Excel 2007 Outputs Hugely Bloated File
    By IanWF in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-08-2011, 01:14 PM
  5. Page Refresh button required (Macro..?)
    By Monk in forum Excel General
    Replies: 0
    Last Post: 02-13-2006, 08:15 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