[FONT="]Hello!
I need your help to build a macro that can do this manual and boring task for me.
I have a list of information and I need to:
1 – Insert two rows every time the code in the column A changes
2 – Sort every single new interval by date (column B) and then by description (column D)
3 – Sum the values in every single new interval (column C)
Do you think this is possible or is it asking too much????
Thank you in advance for your help!
Simona
I hope you can understand it from here:
It lost all the formatting though....<o
></o
>[/FONT]
[FONT="]Before<o
></o
>[/FONT]
<table class="MsoNormalTable" style="width: 395.45pt; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="527"> <tbody><tr style="height: 15.75pt;"> <td style="width: 38.5pt; padding: 0cm; height: 15.75pt;" width="51">
</td> <td style="width: 69.75pt; padding: 0cm; height: 15.75pt;" width="93"> </td> <td style="width: 81.75pt; padding: 0cm; height: 15.75pt;" width="109"> </td> <td style="width: 67.2pt; padding: 0cm; height: 15.75pt;" width="90"> </td> <td style="width: 138.25pt; padding: 0cm; height: 15.75pt;" width="184"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> [FONT="]After<o
></o
>[/FONT]
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> <tr style="height: 15.75pt;"> <td style="padding: 0cm; height: 15.75pt;">
</td> <td style="padding: 0cm; height: 15.75pt;"> </td> <td style="padding: 0cm; height: 15.75pt;"> </td> <td style="padding: 0cm; height: 15.75pt;"> </td> <td style="padding: 0cm; height: 15.75pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;"> </td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> </tbody></table>
I need your help to build a macro that can do this manual and boring task for me.
I have a list of information and I need to:
1 – Insert two rows every time the code in the column A changes
2 – Sort every single new interval by date (column B) and then by description (column D)
3 – Sum the values in every single new interval (column C)
Do you think this is possible or is it asking too much????
Thank you in advance for your help!
Simona
I hope you can understand it from here:
It lost all the formatting though....<o


[FONT="]Before<o


<table class="MsoNormalTable" style="width: 395.45pt; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="527"> <tbody><tr style="height: 15.75pt;"> <td style="width: 38.5pt; padding: 0cm; height: 15.75pt;" width="51">
</td> <td style="width: 69.75pt; padding: 0cm; height: 15.75pt;" width="93">
[FONT="]A<o
></o
>[/FONT]


[FONT="]B<o
></o
>[/FONT]


[FONT="]C<o
></o
>[/FONT]


[FONT="]D<o
></o
>[/FONT]


[FONT="]1<o
></o
>[/FONT]


[FONT="]Analysis Code<o
></o
>[/FONT]


[FONT="]Transaction Date<o
></o
>[/FONT]


[FONT="]Base Amount<o
></o
>[/FONT]


[FONT="]Description<o
></o
>[/FONT]


[FONT="]2<o
></o
>[/FONT]


[FONT="]1011101<o
></o
>[/FONT]


[FONT="]31/08/2010<o
></o
>[/FONT]


[FONT="]2,047.50<o
></o
>[/FONT]


[FONT="]BOULANG<o
></o
>[/FONT]


[FONT="]3<o
></o
>[/FONT]


[FONT="]1011101<o
></o
>[/FONT]


[FONT="]20/07/2010<o
></o
>[/FONT]


[FONT="]27.53<o
></o
>[/FONT]


[FONT="]ANT PATISSERIE<o
></o
>[/FONT]


[FONT="]4<o
></o
>[/FONT]


[FONT="]1011102<o
></o
>[/FONT]


[FONT="]04/08/2010<o
></o
>[/FONT]


[FONT="]531.00<o
></o
>[/FONT]


[FONT="]TANT<o
></o
>[/FONT]


[FONT="]5<o
></o
>[/FONT]


[FONT="]1011102<o
></o
>[/FONT]


[FONT="]31/07/2010<o
></o
>[/FONT]


[FONT="]-1,350.48<o
></o
>[/FONT]


[FONT="]Soft Drink Accrual<o
></o
>[/FONT]


[FONT="]6<o
></o
>[/FONT]


[FONT="]1011102<o
></o
>[/FONT]


[FONT="]31/08/2010<o
></o
>[/FONT]


[FONT="]-14,869.60<o
></o
>[/FONT]


[FONT="]Soft Drinks Stock<o
></o
>[/FONT]


[FONT="]7<o
></o
>[/FONT]


[FONT="]1011201<o
></o
>[/FONT]


[FONT="]31/08/2010<o
></o
>[/FONT]


[FONT="]-20,086.75<o
></o
>[/FONT]


[FONT="]Food Stock<o
></o
>[/FONT]


[FONT="]8<o
></o
>[/FONT]


[FONT="]1011201<o
></o
>[/FONT]


[FONT="]31/07/2010<o
></o
>[/FONT]


[FONT="]18,446.90<o
></o
>[/FONT]


[FONT="]Food Stock<o
></o
>[/FONT]


[FONT="]9<o
></o
>[/FONT]


[FONT="]1011201<o
></o
>[/FONT]


[FONT="]31/07/2010<o
></o
>[/FONT]


[FONT="]-2,140.37<o
></o
>[/FONT]


[FONT="]Food Accrual<o
></o
>[/FONT]


[FONT="]10<o
></o
>[/FONT]


[FONT="]1011202<o
></o
>[/FONT]


[FONT="]18/08/2010<o
></o
>[/FONT]


[FONT="]595.80<o
></o
>[/FONT]


[FONT="]FRESH DISP<o
></o
>[/FONT]


[FONT="]11<o
></o
>[/FONT]


[FONT="]1011202<o
></o
>[/FONT]


[FONT="]07/08/2010<o
></o
>[/FONT]


[FONT="]86.59<o
></o
>[/FONT]


[FONT="]ABC FOOD<o
></o
>[/FONT]


</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;"> [FONT="]After<o


</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> <tr style="height: 15.75pt;"> <td style="padding: 0cm; height: 15.75pt;">
</td> <td style="padding: 0cm; height: 15.75pt;">
[FONT="]A<o
></o
>[/FONT]


[FONT="]B<o
></o
>[/FONT]


[FONT="]C<o
></o
>[/FONT]


[FONT="]D<o
></o
>[/FONT]


[FONT="]1<o
></o
>[/FONT]


[FONT="]Analysis Code<o
></o
>[/FONT]


[FONT="]Transaction Date<o
></o
>[/FONT]


[FONT="]Base Amount<o
></o
>[/FONT]


[FONT="]Description<o
></o
>[/FONT]


[FONT="]2<o
></o
>[/FONT]


[FONT="]1011101<o
></o
>[/FONT]


[FONT="]20/07/2010<o
></o
>[/FONT]


[FONT="]27.53<o
></o
>[/FONT]


[FONT="]ANT PATISSERIE<o
></o
>[/FONT]


[FONT="]3<o
></o
>[/FONT]


[FONT="]1011101<o
></o
>[/FONT]


[FONT="]31/08/2010<o
></o
>[/FONT]


[FONT="]2,047.50<o
></o
>[/FONT]


[FONT="]BOULANG<o
></o
>[/FONT]


[FONT="]4<o
></o
>[/FONT]


</td> <td style="padding: 0cm; height: 15pt;">
[FONT="]sum<o
></o
>[/FONT]


[FONT="]2,075.03<o
></o
>[/FONT]


</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;">
[FONT="]5<o
></o
>[/FONT]


</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;">
[FONT="]6<o
></o
>[/FONT]


[FONT="]1011102<o
></o
>[/FONT]


[FONT="]31/07/2010<o
></o
>[/FONT]


[FONT="]-1,350.48<o
></o
>[/FONT]


[FONT="]Soft Drink Accrual<o
></o
>[/FONT]


[FONT="]7<o
></o
>[/FONT]


[FONT="]1011102<o
></o
>[/FONT]


[FONT="]31/08/2010<o
></o
>[/FONT]


[FONT="]-14,869.60<o
></o
>[/FONT]


[FONT="]Soft Drinks Stock<o
></o
>[/FONT]


[FONT="]8<o
></o
>[/FONT]


[FONT="]1011102<o
></o
>[/FONT]


[FONT="]04/08/2010<o
></o
>[/FONT]


[FONT="]531.00<o
></o
>[/FONT]


[FONT="]TANT<o
></o
>[/FONT]


[FONT="]9<o
></o
>[/FONT]


</td> <td style="padding: 0cm; height: 15pt;">
[FONT="]sum<o
></o
>[/FONT]


[FONT="]-15,689.08<o
></o
>[/FONT]


</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;">
[FONT="]10<o
></o
>[/FONT]


</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;">
[FONT="]11<o
></o
>[/FONT]


[FONT="]1011201<o
></o
>[/FONT]


[FONT="]31/08/2010<o
></o
>[/FONT]


[FONT="]-20,086.75<o
></o
>[/FONT]


[FONT="]Food Stock<o
></o
>[/FONT]


[FONT="]12<o
></o
>[/FONT]


[FONT="]1011201<o
></o
>[/FONT]


[FONT="]31/07/2010<o
></o
>[/FONT]


[FONT="]18,446.90<o
></o
>[/FONT]


[FONT="]Food Stock<o
></o
>[/FONT]


[FONT="]13<o
></o
>[/FONT]


[FONT="]1011201<o
></o
>[/FONT]


[FONT="]31/07/2010<o
></o
>[/FONT]


[FONT="]-2,140.37<o
></o
>[/FONT]


[FONT="]Food Accrual<o
></o
>[/FONT]


[FONT="]14<o
></o
>[/FONT]


</td> <td style="padding: 0cm; height: 15pt;">
[FONT="]sum<o
></o
>[/FONT]


[FONT="]-3,780.22<o
></o
>[/FONT]


</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;">
[FONT="]15<o
></o
>[/FONT]


</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
</td> </tr> <tr style="height: 15pt;"> <td style="padding: 0cm; height: 15pt;">
[FONT="]16<o
></o
>[/FONT]


[FONT="]1011202<o
></o
>[/FONT]


[FONT="]18/08/2010<o
></o
>[/FONT]


[FONT="]595.80<o
></o
>[/FONT]


[FONT="]FRESH DISP<o
></o
>[/FONT]


[FONT="]17<o
></o
>[/FONT]


[FONT="]1011202<o
></o
>[/FONT]


[FONT="]07/08/2010<o
></o
>[/FONT]


[FONT="]86.59<o
></o
>[/FONT]


[FONT="]ABC FOOD<o
></o
>[/FONT]


</td> <td style="padding: 0cm; height: 15pt;">
</td> <td style="padding: 0cm; height: 15pt;">
[FONT="]sum<o
></o
>[/FONT]


[FONT="]682.39<o
></o
>[/FONT]


</td> </tr> </tbody></table>