Tag transactions that can be removed

jansi79

New Member
Joined
Feb 5, 2016
Messages
18
Hello, I have a small excel problem that I was wondering if anyone have a good solution for.
I have a list of transactions that are linked to a profit center and an account, these transactions could be removed if:
• There is a + and a – transaction for the same amount and the same profit center and account.
• Another case where the transactions could be removed is where there are multiple transactions with the same + & - as the two transactions, but where there are more then two. In this case the oldest transactions could be removed, and only the latest should be kept.
If there are only one transaction for the profit center and account at that amount, the transaction should be kept.
I have tried to explain the logic in the table below.
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC;
}
.tableizer-table th {
background-color: #104E8B;
color: #FFF;
font-weight: bold;
}
</style>
<table class="tableizer-table">
<thead><tr class="tableizer-firstrow"><th>Profit Center</th><th>Account</th><th>Profit Center - Account</th><th>Document Date</th><th>Posting Date</th><th>Amount</th><th>Remove/Keep</th></tr></thead><tbody>
<tr><td>0053</td><td>611000</td><td>0053-611000</td><td>30.04.2015</td><td>15.05.2015</td><td>200</td><td>Keep</td></tr>
<tr><td>0053</td><td>611010</td><td>0053-611010</td><td>25.08.2015</td><td>25.08.2015</td><td>350</td><td>Keep</td></tr>
<tr><td>0053</td><td>611100</td><td>0053-611100</td><td>15.05.2015</td><td>15.05.2015</td><td>200</td><td>Remove</td></tr>
<tr><td>0053</td><td>611100</td><td>0053-611100</td><td>15.05.2015</td><td>15.05.2015</td><td>-200</td><td>Remove</td></tr>
<tr><td>0053</td><td>611100</td><td>0053-611100</td><td>15.05.2015</td><td>15.05.2015</td><td>200</td><td>Remove</td></tr>
<tr><td>0053</td><td>611100</td><td>0053-611100</td><td>30.07.2015</td><td>31.07.2015</td><td>-200</td><td>Remove</td></tr>
<tr><td>0053</td><td>611200</td><td>0053-611200</td><td>01.01.2015</td><td>01.01.2015</td><td>-1500</td><td>Remove</td></tr>
<tr><td>0053</td><td>611200</td><td>0053-611200</td><td>09.02.2015</td><td>10.02.2015</td><td>1500</td><td>Remove</td></tr>
<tr><td>0053</td><td>611200</td><td>0053-611200</td><td>11.05.2015</td><td>31.05.2015</td><td>1500</td><td>Keep</td></tr>
<tr><td>0053</td><td>611500</td><td>0053-611500</td><td>01.01.2015</td><td>03.01.2015</td><td>2000</td><td>Remove</td></tr>
<tr><td>0053</td><td>611500</td><td>0053-611500</td><td>06.04.2015</td><td>06.04.2015</td><td>-2000</td><td>Keep</td></tr>
<tr><td>0053</td><td>611500</td><td>0053-611500</td><td>09.02.2015</td><td>09.02.2015</td><td>-2000</td><td>Remove</td></tr>
<tr><td>0053</td><td>612000</td><td>0053-612000</td><td>19.06.2015</td><td>25.06.2015</td><td>300</td><td>Keep</td></tr>
<tr><td>0053</td><td>612000</td><td>0053-612000</td><td>21.09.2015</td><td>21.09.2015</td><td>500</td><td>Keep</td></tr>
<tr><td>0053</td><td>612000</td><td>0053-612000</td><td>29.06.2015</td><td>29.06.2015</td><td>200</td><td>Keep</td></tr>
</tbody></table>

I appreciate any assistance I could get on this excel problem.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
[TABLE="width: 1143"]
<colgroup><col><col><col><col><col><col><col><col span="7"></colgroup><tbody>[TR]
[TD]Profit Center[/TD]
[TD]Account[/TD]
[TD]Profit Center - Account[/TD]
[TD]Document Date[/TD]
[TD]Posting Date[/TD]
[TD]Amount[/TD]
[TD]Remove/Keep[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611000[/TD]
[TD]0053-611000[/TD]
[TD]30.04.2015[/TD]
[TD]15.05.2015[/TD]
[TD="align: right"]200[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611010[/TD]
[TD]0053-611010[/TD]
[TD]25.08.2015[/TD]
[TD]25.08.2015[/TD]
[TD="align: right"]350[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611100[/TD]
[TD]0053-611100[/TD]
[TD]15.05.2015[/TD]
[TD]15.05.2015[/TD]
[TD="align: right"]200[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611100[/TD]
[TD]0053-611100[/TD]
[TD]15.05.2015[/TD]
[TD]15.05.2015[/TD]
[TD="align: right"]-200[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611100[/TD]
[TD]0053-611100[/TD]
[TD]15.05.2015[/TD]
[TD]15.05.2015[/TD]
[TD="align: right"]200[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611100[/TD]
[TD]0053-611100[/TD]
[TD]30.07.2015[/TD]
[TD]31.07.2015[/TD]
[TD="align: right"]-200[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611200[/TD]
[TD]0053-611200[/TD]
[TD]01.01.2015[/TD]
[TD]01.01.2015[/TD]
[TD="align: right"]-1500[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611200[/TD]
[TD]0053-611200[/TD]
[TD]09.02.2015[/TD]
[TD]10.02.2015[/TD]
[TD="align: right"]1500[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611200[/TD]
[TD]0053-611200[/TD]
[TD]11.05.2015[/TD]
[TD]31.05.2015[/TD]
[TD="align: right"]1500[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611500[/TD]
[TD]0053-611500[/TD]
[TD]01.01.2015[/TD]
[TD]03.01.2015[/TD]
[TD="align: right"]2000[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611500[/TD]
[TD]0053-611500[/TD]
[TD]06.04.2015[/TD]
[TD]06.04.2015[/TD]
[TD="align: right"]-2000[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611500[/TD]
[TD]0053-611500[/TD]
[TD]09.02.2015[/TD]
[TD]09.02.2015[/TD]
[TD="align: right"]-2000[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]612000[/TD]
[TD]0053-612000[/TD]
[TD]19.06.2015[/TD]
[TD]25.06.2015[/TD]
[TD="align: right"]300[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]612000[/TD]
[TD]0053-612000[/TD]
[TD]21.09.2015[/TD]
[TD]21.09.2015[/TD]
[TD="align: right"]500[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]612000[/TD]
[TD]0053-612000[/TD]
[TD]29.06.2015[/TD]
[TD]29.06.2015[/TD]
[TD="align: right"]200[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Profit Center[/TD]
[TD]Account[/TD]
[TD]Profit Center - Account[/TD]
[TD]Document Date[/TD]
[TD]Posting Date[/TD]
[TD]Amount[/TD]
[TD]Remove/Keep[/TD]
[TD="colspan: 2"]absamount[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611000[/TD]
[TD]0053-611000[/TD]
[TD]30.04.2015[/TD]
[TD]15.05.2015[/TD]
[TD="align: right"]200[/TD]
[TD]Keep[/TD]
[TD="align: right"]200[/TD]
[TD][/TD]
[TD="colspan: 5"]I added an absamount column and sorted by first[/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611010[/TD]
[TD]0053-611010[/TD]
[TD]25.08.2015[/TD]
[TD]25.08.2015[/TD]
[TD="align: right"]350[/TD]
[TD]Keep[/TD]
[TD="align: right"]350[/TD]
[TD][/TD]
[TD="colspan: 4"] account then absamount ascending[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611100[/TD]
[TD]0053-611100[/TD]
[TD]15.05.2015[/TD]
[TD]15.05.2015[/TD]
[TD="align: right"]200[/TD]
[TD]Remove[/TD]
[TD="align: right"]200[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611100[/TD]
[TD]0053-611100[/TD]
[TD]15.05.2015[/TD]
[TD]15.05.2015[/TD]
[TD="align: right"]-200[/TD]
[TD]Remove[/TD]
[TD="align: right"]200[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611100[/TD]
[TD]0053-611100[/TD]
[TD]15.05.2015[/TD]
[TD]15.05.2015[/TD]
[TD="align: right"]200[/TD]
[TD]Remove[/TD]
[TD="align: right"]200[/TD]
[TD][/TD]
[TD="colspan: 4"]can you now take out rows manually[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611100[/TD]
[TD]0053-611100[/TD]
[TD]30.07.2015[/TD]
[TD]31.07.2015[/TD]
[TD="align: right"]-200[/TD]
[TD]Remove[/TD]
[TD="align: right"]200[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611200[/TD]
[TD]0053-611200[/TD]
[TD]01.01.2015[/TD]
[TD]01.01.2015[/TD]
[TD="align: right"]-1500[/TD]
[TD]Remove[/TD]
[TD="align: right"]1500[/TD]
[TD][/TD]
[TD="colspan: 3"]or are there thousands of rows ?[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611200[/TD]
[TD]0053-611200[/TD]
[TD]09.02.2015[/TD]
[TD]10.02.2015[/TD]
[TD="align: right"]1500[/TD]
[TD]Remove[/TD]
[TD="align: right"]1500[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611200[/TD]
[TD]0053-611200[/TD]
[TD]11.05.2015[/TD]
[TD]31.05.2015[/TD]
[TD="align: right"]1500[/TD]
[TD]Keep[/TD]
[TD="align: right"]1500[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611500[/TD]
[TD]0053-611500[/TD]
[TD]01.01.2015[/TD]
[TD]03.01.2015[/TD]
[TD="align: right"]2000[/TD]
[TD]Remove[/TD]
[TD="align: right"]2000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611500[/TD]
[TD]0053-611500[/TD]
[TD]06.04.2015[/TD]
[TD]06.04.2015[/TD]
[TD="align: right"]-2000[/TD]
[TD]Keep[/TD]
[TD="align: right"]2000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]611500[/TD]
[TD]0053-611500[/TD]
[TD]09.02.2015[/TD]
[TD]09.02.2015[/TD]
[TD="align: right"]-2000[/TD]
[TD]Remove[/TD]
[TD="align: right"]2000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]612000[/TD]
[TD]0053-612000[/TD]
[TD]29.06.2015[/TD]
[TD]29.06.2015[/TD]
[TD="align: right"]200[/TD]
[TD]Keep[/TD]
[TD="align: right"]200[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]612000[/TD]
[TD]0053-612000[/TD]
[TD]19.06.2015[/TD]
[TD]25.06.2015[/TD]
[TD="align: right"]300[/TD]
[TD]Keep[/TD]
[TD="align: right"]300[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]53[/TD]
[TD="align: right"]612000[/TD]
[TD]0053-612000[/TD]
[TD]21.09.2015[/TD]
[TD]21.09.2015[/TD]
[TD="align: right"]500[/TD]
[TD]Keep[/TD]
[TD="align: right"]500[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
There are thousands of rows and I would like to have formula that gives me the "Keep" or "Remove". There should not be the need to filter the list. I think it could be done by using array-functions, but I do not know how to do it.
 
Upvote 0
these transactions could be removed if:
• There is a + and a – transaction for the same amount and the same profit center and account.

profitcentre1 account 1 +10 and -10 so remove

Another case where the transactions could be removed is where there are multiple transactions with the same + & - as the two transactions, but where there are more then two. In this case the oldest transactions could be removed, and only the latest should be kept

in this second case you seem to be saying if there is another profitcentre1 account 1 +10 and -10 THEN only remove one pair ????
 
Upvote 0
The first case you have correct, the pair should be removed.
The last case is that if profitcentre1 account 1 +10 and -10 and -10 and +10 and +10 THEN remove the earliest pairs and keep the last value (+10)

Regards

Jan Sigve
 
Upvote 0
[TABLE="width: 1056"]
<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col span="4"></colgroup><tbody>[TR]
[TD]account[/TD]
[TD]date1[/TD]
[TD]date2[/TD]
[TD]amount[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0053-611000[/TD]
[TD]30.04.2015[/TD]
[TD]15.05.2015[/TD]
[TD="align: right"]200[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0053-611010[/TD]
[TD]25.08.2015[/TD]
[TD]25.08.2015[/TD]
[TD="align: right"]350[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0053-611200[/TD]
[TD]11.05.2015[/TD]
[TD]31.05.2015[/TD]
[TD="align: right"]1500[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0053-611500[/TD]
[TD]09.02.2015[/TD]
[TD]09.02.2015[/TD]
[TD="align: right"]-2000[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0053-612000[/TD]
[TD]19.06.2015[/TD]
[TD]25.06.2015[/TD]
[TD="align: right"]300[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0053-612000[/TD]
[TD]21.09.2015[/TD]
[TD]21.09.2015[/TD]
[TD="align: right"]500[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0053-612000[/TD]
[TD]29.06.2015[/TD]
[TD]29.06.2015[/TD]
[TD="align: right"]200[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]original data[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]account[/TD]
[TD]date1[/TD]
[TD]date2[/TD]
[TD]amount[/TD]
[TD="colspan: 2"]what to do[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-611000[/TD]
[TD]30.04.2015[/TD]
[TD]15.05.2015[/TD]
[TD="align: right"]200[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-611010[/TD]
[TD]25.08.2015[/TD]
[TD]25.08.2015[/TD]
[TD="align: right"]350[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-611100[/TD]
[TD]15.05.2015[/TD]
[TD]15.05.2015[/TD]
[TD="align: right"]200[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-611100[/TD]
[TD]15.05.2015[/TD]
[TD]15.05.2015[/TD]
[TD="align: right"]-200[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-611100[/TD]
[TD]15.05.2015[/TD]
[TD]15.05.2015[/TD]
[TD="align: right"]200[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-611100[/TD]
[TD]30.07.2015[/TD]
[TD]31.07.2015[/TD]
[TD="align: right"]-200[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-611200[/TD]
[TD]01.01.2015[/TD]
[TD]01.01.2015[/TD]
[TD="align: right"]-1500[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-611200[/TD]
[TD]09.02.2015[/TD]
[TD]10.02.2015[/TD]
[TD="align: right"]1500[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-611200[/TD]
[TD]11.05.2015[/TD]
[TD]31.05.2015[/TD]
[TD="align: right"]1500[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-611500[/TD]
[TD]01.01.2015[/TD]
[TD]03.01.2015[/TD]
[TD="align: right"]2000[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-611500[/TD]
[TD]06.04.2015[/TD]
[TD]06.04.2015[/TD]
[TD="align: right"]-2000[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-611500[/TD]
[TD]09.02.2015[/TD]
[TD]09.02.2015[/TD]
[TD="align: right"]-2000[/TD]
[TD]Remove[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-612000[/TD]
[TD]19.06.2015[/TD]
[TD]25.06.2015[/TD]
[TD="align: right"]300[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-612000[/TD]
[TD]21.09.2015[/TD]
[TD]21.09.2015[/TD]
[TD="align: right"]500[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]0053-612000[/TD]
[TD]29.06.2015[/TD]
[TD]29.06.2015[/TD]
[TD="align: right"]200[/TD]
[TD]Keep[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]this macro processed this data[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 4"]note for clarity I only worked with these columns[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]having deleted the first 2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Rrows = 16[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]10 For j = 2 To Rrows[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"] amount = Cells(j, 4)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"] For k = j + 1 To Rrows[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"] tryamount = Cells(k, 4)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 5"] If tryamount * -1 = amount Then GoTo 50 Else GoTo 200[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 5"]50 If Cells(j, 1) = Cells(k, 1) Then GoTo 100 Else GoTo 200[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 4"]100 Rows(j).Select: Selection.Delete Shift:=xlUp[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 7"] Rows(k - 1).Select: Selection.Delete Shift:=xlUp: Rrows = Rrows - 2: GoTo 10[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]200 Next k[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] Next j[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]500 End Sub[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
why do you not want to use vba ?

a manual sort first by account then by amount would make it obvious which rows to delete
 
Upvote 0
I am some time working on Client documents and using VBA is not allowed.
I think this should be possible With a clever Array function..
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top