+ Reply to Thread
Results 1 to 2 of 2

macro to Delete Rows where Ref is the Same

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

    macro to Delete Rows where Ref is the Same

    I have references in Col B, Branch in Col C and Values in Col D

    where the Reference is the Same in Col B and branch contains PL and statement and the statement Value is Zero , then then rows containing both the references are to be deleted


    I have attached sample data and have indicated in red those rows to be deleted

    It would be appreciated if someone would kindly provide me with code to do so

    have also posted on Link Below

    https://www.mrexcel.com/board/thread...ement.1177234/
    Last edited by Howardc1001; 07-23-2021 at 09:10 AM. Reason: have also Posted on Mr excel.com

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: macro to Delete Rows where Ref is the Same

    In your example there is no row to delete.
    Rows 2 and 3 do not have 0 value in amount
    Rows 6 and 7 do not have PL in Branch

    I have references in Col B, Branch in Col C and Values in Col D
    => Really ?
    Last edited by PCI; 07-23-2021 at 01:21 PM.
    - Battle without fear gives no glory - Just try

+ 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] Macro to Delete Delete headings and 9 rows above from row 15 onwards
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2021, 12:06 AM
  2. Replies: 1
    Last Post: 01-07-2019, 10:54 AM
  3. Macro to keep rows that have certain text in one column, delete rows that do not.
    By mandalope in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2014, 02:35 PM
  4. Macro To Find Rows With Duplicates, Compare Cells, And Delete Rows. - Excel
    By Kwame001 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-26-2013, 10:41 AM
  5. Macro to delete certain columns and delete rows based on time in another column
    By beepbeep27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2012, 11:47 AM
  6. Replies: 13
    Last Post: 08-23-2011, 11:00 AM
  7. How to make my macro delete rows? It currently hides the rows instead of deleting.
    By Majkataxmk in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-20-2010, 01:14 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