Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Len Len is offline
external usenet poster
 
Posts: 162
Default Delete Rows with Conditions

Hi,

I have at a table below with duplicates of numeric text in column E,
there is no problem using excel formula COUNTIF to remove duplicates
However, if I were to remove each row of duplicates with conditions
that the corresponding value of duplicate in column F is Positive and
also the next value of the same duplicate in the same column F is
negative and both values of that duplicate in column F sum up equal to
zero
In this case, duplicate of 123456 found at E1, E2 and E4 but it has
positive value of 70 at F1 and F2 and also negative value of 70 at F4
Row 1 and 4 will be deleted as the duplicate of 123456 has both value
at F1 ( ie 1st positive value ) & F4 sum up equal to zero
The removal of duplicates will go on until there is no duplicate
found or there is no zero value found after sum up of two duplicate's
value , ie only unique numeric text remain in the table
E.g.
Column E F
Doc No Amt
1 123456 70
2 123456 70
3 654321 -1560
4 123456 -70
5 654321 1560
6 654321 -1560

Result
Doc No Amt
2 123456 70
6 654321 -1560


How to use excel formula or excel vba codes to achieve the result by
removing duplicates with the above conditions

I would be much appreciated if someone could offer a solution to the
above scenario and thanks in advance

Regards
Len
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
delete rows based on 2 conditions of that row Don Doan Excel Programming 2 June 2nd 09 07:17 PM
Delete Rows for given conditions. fpd833 Excel Programming 5 March 2nd 09 07:37 PM
Delete variable # of rows depending on conditions Pman Excel Programming 5 September 27th 07 03:27 PM
how to write to macro to only delete rows under certain conditions cazaril Excel Programming 2 September 6th 07 04:26 PM
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below Annette[_4_] Excel Programming 2 September 21st 04 02:40 PM


All times are GMT +1. The time now is 12:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"