+ Reply to Thread
Results 1 to 4 of 4

Macro to clear specific Items

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,722

    Macro to clear specific Items

    I have either Paid or Not Paid in Col P

    Where "Paid" appears in Col P from Row 2 onwards , I would like code to clear all the rows where Paid appears in Col P and then to delete the blank rows from row 2 onwards

    I have tried to write code to do this, but get a run time error "Application defined or object defined error"


    It would be appreciated if someone could assist me
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,525

    Re: Macro to clear specific Items

    Please Login or Register  to view this content.
    If you are in the 16th Column, you can't offset - 16 as that puts you in Column 0 and that Column does not exist. Should be -15.

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,722

    Re: Macro to clear specific Items

    Thanks for your help

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,789

    Re: Macro to clear specific Items

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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 Clear formatting and Save as with specific char set and format
    By kal-el.Kanata in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2017, 03:24 PM
  2. VBA MAcro to clear contents of specific cells if a specific cell contains text
    By muzzareilly in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-28-2017, 12:47 PM
  3. [SOLVED] Macro to Clear content after specific cell
    By kasun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-30-2015, 01:45 PM
  4. macro to clear a range in specific sheets
    By indiana115 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-27-2014, 07:53 PM
  5. [SOLVED] VBA Macro To Clear Cell When Specific Text Is Entered
    By paulm99 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-14-2014, 06:52 PM
  6. Macro to clear only the contents of the cells which have a specific font colour
    By Stellakyp in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-05-2013, 11:01 AM
  7. [SOLVED] Macro to clear contents based on specific criteria
    By greggatz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2012, 10:26 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