Results 1 to 10 of 30

Thread: Delete rows based on match criteria in two excel files, 1 might be .csv file .Opened in Excel=Fail Chaos

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10

    Conditionally compare the data & delete entire row

    _____ Workbook: 1.xls ( Using Excel 2007 32 bit )
    Row\Col D H I J K L M N O P Q R
    1 Open LTP If column J of 1.xls has buy & column H of 1.xls is not greater than column D of 1.xls If column J of 1.xls has short & column H of 1.xls is Greater than than column D of 1.xls If column J of 1.xls has a blank cell
    2
    1183.72
    1227.1
    22
    BUY FALSE FALSE FALSE
    3
    139.38
    140
    25
    BUY FALSE FALSE FALSE
    4
    311.85
    312
    15083
    SHORT FALSE
    15083
    FALSE
    5
    33.165
    33.2
    17388
    SHORT FALSE
    17388
    FALSE
    6
    594
    594
    100
    FALSE FALSE
    100
    7
    1584.488
    1617.9
    236
    BUY FALSE FALSE FALSE
    Worksheet: 1-Sheet1 29May excelforum

    _____ Workbook: 1.xls ( Using Excel 2007 32 bit )
    Row\Col D H I J K L M N O P Q R
    1 Open LTP If column J of 1.xls has buy & column H of 1.xls is not greater than column D of 1.xls If column J of 1.xls has short & column H of 1.xls is Greater than than column D of 1.xls If column J of 1.xls has a blank cell
    2
    1183.72
    1227.1
    22
    BUY =IF((J2:J7="buy")*(H2:H7),I2:I7) =IF((J2:J7="short")*(H2:H7>D2:D7),I2:I7) =IF(J2:J7="",I2:I7)
    3
    139.38
    140
    25
    BUY =IF((J2:J7="buy")*(H2:H7),I2:I7) =IF((J2:J7="short")*(H2:H7>D2:D7),I2:I7) =IF(J2:J7="",I2:I7)
    4
    311.85
    312
    15083
    SHORT =IF((J2:J7="buy")*(H2:H7),I2:I7)
    =IF((J2:J7="short")*(H2:H7>D2:D7),I2:I7)
    =IF(J2:J7="",I2:I7)
    5
    33.165
    33.2
    17388
    SHORT =IF((J2:J7="buy")*(H2:H7),I2:I7)
    =IF((J2:J7="short")*(H2:H7>D2:D7),I2:I7)
    =IF(J2:J7="",I2:I7)
    6
    594
    594
    100
    =IF((J2:J7="buy")*(H2:H7),I2:I7) =IF((J2:J7="short")*(H2:H7>D2:D7),I2:I7)
    =IF(J2:J7="",I2:I7)
    7
    1584.488
    1617.9
    236
    BUY =IF((J2:J7="buy")*(H2:H7),I2:I7) =IF((J2:J7="short")*(H2:H7>D2:D7),I2:I7) =IF(J2:J7="",I2:I7)
    Worksheet: 1-Sheet1 29May excelforum


    If column J of 1.xls has buy & column H of 1.xls is not greater than column D of 1.xls then match column I data of 1.xls with column B of alert.csv and if it matches then delete that entire row of alert.csv
    If column J of 1.xls has buy & column H of 1.xls is not greater than column D of 1.xls
    FALSE
    FALSE
    FALSE
    FALSE
    FALSE
    FALSE
    Filter to match to not false = Empty
    If column J of 1.xls has a blank cell then match column I data of 1.xls with column B of alert.csv and if it matches then delete that entire row of alert.csv
    If column J of 1.xls has a blank cell
    FALSE
    FALSE
    FALSE
    FALSE
    100
    FALSE
    Filter to match to not false = {100}
    If column J of 1.xls has short & column H of 1.xls is Greater than than column D of 1.xls then match column I data of 1.xls with column B of alert.csv and if it matches then delete that entire row of alert.csv
    If column J of 1.xls has short & column H of 1.xls is Greater than than column D of 1.xls
    FALSE
    FALSE
    15083
    17388
    FALSE
    FALSE
    Filter to match to not false = {15083, 17388}
    final txt , after running Sub jindonsTesties() , is And (Not F2 = 15083) And (Not F2 = 17388) And (Not F2 = 100)


    If column J of 1.xls has buy & column H of 1.xls is not greater than column D of 1.xls then match column I data of 1.xls with column B of alert.csv and if it matches then delete that entire row of alert.csv
    If column J of 1.xls has buy & column H of 1.xls is not greater than column D of 1.xls
    =TRANSPOSE(IF((J2:J7="buy")*(H2:H7),I2:I7))
    =TRANSPOSE(IF((J2:J7="buy")*(H2:H7),I2:I7))
    =TRANSPOSE(IF((J2:J7="buy")*(H2:H7),I2:I7))
    =TRANSPOSE(IF((J2:J7="buy")*(H2:H7),I2:I7))
    =TRANSPOSE(IF((J2:J7="buy")*(H2:H7),I2:I7))
    =TRANSPOSE(IF((J2:J7="buy")*(H2:H7),I2:I7))
    Filter to match to not false = Empty
    If column J of 1.xls has a blank cell then match column I data of 1.xls with column B of alert.csv and if it matches then delete that entire row of alert.csv
    If column J of 1.xls has a blank cell
    =TRANSPOSE(IF(J2:J7="",I2:I7))
    =TRANSPOSE(IF(J2:J7="",I2:I7))
    =TRANSPOSE(IF(J2:J7="",I2:I7))
    =TRANSPOSE(IF(J2:J7="",I2:I7))
    =TRANSPOSE(IF(J2:J7="",I2:I7))
    =TRANSPOSE(IF(J2:J7="",I2:I7))
    Filter to match to not false = {100}
    If column J of 1.xls has short & column H of 1.xls is Greater than than column D of 1.xls then match column I data of 1.xls with column B of alert.csv and if it matches then delete that entire row of alert.csv
    If column J of 1.xls has short & column H of 1.xls is Greater than than column D of 1.xls
    =TRANSPOSE(IF((J2:J7="short")*(H2:H7>D2:D7),I2:I7))
    =TRANSPOSE(IF((J2:J7="short")*(H2:H7>D2:D7),I2:I7))
    =TRANSPOSE(IF((J2:J7="short")*(H2:H7>D2:D7),I2:I7))
    =TRANSPOSE(IF((J2:J7="short")*(H2:H7>D2:D7),I2:I7))
    =TRANSPOSE(IF((J2:J7="short")*(H2:H7>D2:D7),I2:I7))
    =TRANSPOSE(IF((J2:J7="short")*(H2:H7>D2:D7),I2:I7))
    Filter to match to not false = {15083, 17388}
    final txt , after running Sub jindonsTesties() , is And (Not F2 = 15083) And (Not F2 = 17388) And (Not F2 = 100)



    final txt , after running Sub jindonsTesties() , Part 1== , is
    And (Not F2 = 15083) And (Not F2 = 17388) And (Not F2 = 100)
    Last edited by DocAElstein; 06-08-2020 at 02:43 AM.
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

Similar Threads

  1. Delete One Row From A 2D Variant Array
    By Rick Rothstein in forum Rick Rothstein's Corner
    Replies: 18
    Last Post: 02-23-2020, 03:10 PM
  2. Replies: 6
    Last Post: 03-26-2014, 03:04 PM
  3. Replies: 1
    Last Post: 02-25-2014, 10:55 PM
  4. Delte a specific column and does not delete the top row
    By jffryjsphbyn in forum Excel Help
    Replies: 1
    Last Post: 06-13-2013, 02:00 PM
  5. Replies: 4
    Last Post: 03-22-2013, 01:47 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •