+ Reply to Thread
Results 1 to 6 of 6

If condition match then delete entire row by vba else do nothing

  1. #1
    Spammer
    Join Date
    06-09-2014
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    149

    If condition match then delete entire row by vba else do nothing

    Hi Experts,

    I am looking for a macro details are mentioned below & plz see the sample file

    Thnx For the Help

    If column J has BUY then compare column K with column with column H & if column K is Greater than column H then do nothing else delete entire row
    If column J has SELL then compare column K with column with column H & if column K is smaller than column H then do nothing else delete entire row
    If column J has DELETE then delete entire row by vba
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: If condition match then delete entire row by vba else do nothing

    Non VBA solution

    L2 =IF(OR(AND($K2>$H2,J2="BUY"),AND($K2<$H2,J2="SELL")),"","delete") and drag down.

    After that filter on delete in column L and delete the rows.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Spammer
    Join Date
    06-09-2014
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    149

    Re: If condition match then delete entire row by vba else do nothing

    Thnx Sir for showing ur great interest in solving this problem

    But
    I am looking for VBA macro only sir

  4. #4
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: If condition match then delete entire row by vba else do nothing

    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: If condition match then delete entire row by vba else do nothing

    Quote Originally Posted by MoldyBread View Post
    If column J has BUY then compare column K with column with column H & if column K is Greater than column H then do nothing else delete entire row
    If column J has SELL then compare column K with column with column H & if column K is smaller than column H then do nothing else delete entire row
    If column J has DELETE then delete entire row by vba
    try
    Please Login or Register  to view this content.

  6. #6
    Spammer
    Join Date
    06-09-2014
    Location
    https://t.me/pump_upp
    MS-Off Ver
    Microst Office 365 Plus
    Posts
    149

    Re: If condition match then delete entire row by vba else do nothing

    Thnx Alot Jindon Sir for helping me in solving this problem Sir
    Have a Great Day
    Problem Solved

+ 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. Delete entire row based on certain condition
    By roberco30 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-04-2017, 10:41 PM
  2. delete empty entire row with condition
    By ash3angel in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-29-2015, 08:29 AM
  3. [SOLVED] VBA to delete entire row based on condition met
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-17-2014, 05:48 PM
  4. [SOLVED] Delete the entire row if condition didn't match
    By sunheroj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2012, 04:08 PM
  5. [SOLVED] Macro to delete entire row on a condition
    By kgonzalbo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2011, 12:39 AM
  6. Delete entire row on condition
    By bouitac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2009, 04:58 PM
  7. [SOLVED] Can I delete an entire row if condition is not met?
    By Christine in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-04-2006, 04:50 AM

Tags for this Thread

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