+ Reply to Thread
Results 1 to 4 of 4

VBA amendment to delete specific range instead of row

  1. #1
    Registered User
    Join Date
    03-01-2019
    Location
    Nottingham, England
    MS-Off Ver
    2016/365
    Posts
    83

    VBA amendment to delete specific range instead of row

    Hi,

    I've been successfully using this macro to delete the entire row if column "R" contains a "2".

    Please Login or Register  to view this content.
    However what I would ideally like it to do is if column "R" contains a "2" then delete only columns "A:R" within the row and not the entire row.

    I've tried a few things but can't get it to work.

    Any suggestions?

    Thanks

    Spoonman

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: VBA amendment to delete specific range instead of row

    So does the data extend past Col R? And you want to shift up ?Perhaps you should upload a sample file and show expected output...
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    03-01-2019
    Location
    Nottingham, England
    MS-Off Ver
    2016/365
    Posts
    83

    Re: VBA amendment to delete specific range instead of row

    Exactly, the data does extend past col R and I would like to shift up.

    I'm not able to upload a sample right now as currently not on my PC, was hoping to get ahead of it

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: VBA amendment to delete specific range instead of row

    Assumes Headers in row 1...
    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] VBA amendment to remove rows/cells containing specific text
    By Spoonman667 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-25-2021, 09:57 PM
  2. [SOLVED] VBA amendment to change range selection
    By Spoonman667 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2021, 02:34 AM
  3. Looping through Range and delete only range row with specific condition
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-21-2019, 08:03 AM
  4. How to find specific work and delete next two rows also select range with specific words
    By priyadharshane in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2019, 03:08 AM
  5. code vba to make amendment to specific cells
    By Akika in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-18-2018, 09:45 PM
  6. [SOLVED] VBA macro range amendment
    By bizzarofen in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-31-2017, 08:00 AM
  7. Code Amendment - Delete Empty Rows
    By TextMonkey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2013, 08:03 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