+ Reply to Thread
Results 1 to 7 of 7

VBA to Match a cell to a column then delete row

  1. #1
    Registered User
    Join Date
    04-25-2017
    Location
    wolfe city, texas
    MS-Off Ver
    2010
    Posts
    5

    VBA to Match a cell to a column then delete row

    I have researched this on the internet and while many examples are out there I have not been able to find one that meets my scenario 100%. My problem is I have a name (Babe Ruth, for example) in cell M6 on Sheet titled "PlayerProfiles". I am trying to have Excel match that name in Column A (Unique names only, no duplicate names in this column) range A4:A1000 on sheet named "Bat Chart". If a match is found delete that row. Once deleted return to "PlayerProfiles worksheet and a message box would say something like 'Babe Ruth's chart has been deleted' or if a match not found 'Babe Ruth's chart has not been created'. Since there are only unique records in column A I do not need it to continue to search through the list for more matches to delete. I've found some examples on google, but they seem to loop on and on or take what seems a lifetime to finish. Any help would be greatly appreciated.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,746

    Re: VBA to Match a cell to a column then delete row

    How about
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,404

    Re: VBA to Match a cell to a column then delete row

    .
    Another approach :

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-25-2017
    Location
    wolfe city, texas
    MS-Off Ver
    2010
    Posts
    5

    Re: VBA to Match a cell to a column then delete row

    This works great also. Kudos to you for lending your time and efforts to my problem.

  5. #5
    Registered User
    Join Date
    04-25-2017
    Location
    wolfe city, texas
    MS-Off Ver
    2010
    Posts
    5

    Re: VBA to Match a cell to a column then delete row

    Thanks this works awesome. Your time and efforts are greatly appreciated.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,746

    Re: VBA to Match a cell to a column then delete row

    You're welcome & thanks for the feedback

  7. #7
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,404

    Re: VBA to Match a cell to a column then delete row

    .
    You are welcome. Apologies for not responding sooner. I have not been receiving the notification emails from the Forum for months now.
    I have to manually look over my past posts to see if there have been updates.

    Cheers.

+ 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] If cell in column J does not match to cell in column N then delete row
    By djfscouse in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-03-2018, 04:06 PM
  2. VBA macro to match information from one column with another and delete rows no match
    By Renejorgensen in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-17-2016, 04:07 PM
  3. [SOLVED] Delete Column if cell does not match any of the following words
    By countryfan_nt in forum Excel General
    Replies: 1
    Last Post: 04-06-2016, 03:20 AM
  4. [SOLVED] Go through column and match cell from another list, delete row if not inside
    By Ljung in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 03-14-2016, 09:18 AM
  5. [SOLVED] I need to find & match the data in column in A with column B and delete both
    By RobinPrice in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-29-2014, 11:03 PM
  6. Macro to find and delete column if cell match
    By jimbosguns in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2012, 12:49 PM
  7. To Match Column A and Colum b and delete the value.
    By erickhk83 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-22-2012, 11:11 PM

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