+ Reply to Thread
Results 1 to 3 of 3

Delete rows depending on other row

Hybrid View

  1. #1
    Registered User
    Join Date
    04-28-2021
    Location
    Klepp, Norway
    MS-Off Ver
    365
    Posts
    2

    Delete rows depending on other row

    Hello there

    Trying to sort out some rows in a sheet...

    there is also a column name equipmentType (I) and contains "Wire" or "Equipment"

    And a column called category (C)

    I want all rows that contains category "08.MISC" and Equipmenttype "Wire" to be deleted

    but, i need to flag som rows safe for deleting. see attachement.

    Example: If value of A5 exists in B then A5 is safe

    Red text.. these will be deleted
    Green text- these are safe
    Blue indicate deviations that are safe as explained in the example

    rows 29-37 is deleted... Because it contains "08.MISC" in C column

    Other rows not whown here is deleted becaeuse it containe "Wire" in I column

    Rows 2-28 will remain

    Rows 4,12,15-23, 27-28 contains deviations

    row 4 contains "08.MISC" in C4, but is safe because B4 has a value.

    Row 12 contains "Wire" in I12, but is safe because B12 has a value

    row 16 is safe because the value in A16 exists in B17-B23

    Row 27 is safe because the value in A27 exists in B28.


    Hope you understand my problem. I find it hard to explain it simpler
    Attached Images Attached Images
    Last edited by bdgull; 05-05-2021 at 08:48 AM.

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,086

    Re: Delete rows depending on other row

    Hello bdgull and Welcome to Excel Forum.
    We may be able to build a new range without the red highlighted rows using formulas, however formulas can not delete rows in an existing range.
    It seems to me that there may be a formula or formulas that could be used to mark the rows that should not be copied to a new range based on the values in columns A:C and I.
    If that would be an acceptable solution then please upload an .xlsx file utilizing the instructions in the banner at the top of the page.
    It appears that the omit criteria would be 08.MISC in column C OR Wire in column I.
    Please include at least one example of a row containing wire in column I that should not be copied to the new range.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    04-28-2021
    Location
    Klepp, Norway
    MS-Off Ver
    365
    Posts
    2
    Thank you for replying. I sorted it out more or less like you suggest


    Made som routines that checked for values and added new colums with y or n to delete or not.

    Then checked for values there to delete or not.


    Quote Originally Posted by JeteMc View Post
    Hello bdgull and Welcome to Excel Forum.
    We may be able to build a new range without the red highlighted rows using formulas, however formulas can not delete rows in an existing range.
    It seems to me that there may be a formula or formulas that could be used to mark the rows that should not be copied to a new range based on the values in columns A:C and I.
    If that would be an acceptable solution then please upload an .xlsx file utilizing the instructions in the banner at the top of the page.
    It appears that the omit criteria would be 08.MISC in column C OR Wire in column I.
    Please include at least one example of a row containing wire in column I that should not be copied to the new range.
    Let us know if you have any questions.

+ 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 rows depending on value
    By Mazzaaa in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-19-2016, 09:16 AM
  2. [SOLVED] Delete certain rows depending on value in a specific cell
    By badlydrunkboy in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-07-2014, 06:23 AM
  3. Delete columns depending on the number of rows.
    By TallOne in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-05-2014, 06:42 AM
  4. Delete rows depending on date
    By danieldaniel1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-06-2013, 11:56 AM
  5. delete rows depending on value in two column
    By meslija in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2011, 07:05 AM
  6. macro to delete certain rows depending on value
    By sandbach in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-12-2010, 06:37 AM
  7. How to delete a set of rows depending on Value
    By msbutton27 in forum Excel General
    Replies: 1
    Last Post: 01-15-2006, 01:00 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