I have a workfile that I need to sort by Date and Control Number (Ctl)
The Problem that I am faced with, is that I may have a date 25/04/2007 with Control Number 8045 for say 1000.00. The customer may only pay on say 01/05/2007 on control number 8045.
I would like VBA code that will sort the data by Date, but also group all the control numbers together. In this example it will be as follows
Date Control Number Amount
25/04/2007 8045 1000.00
01/05/2007 8045 -800.00
I have attached sample file. In the sample file the CTL 8322 & 8722 must be grouped together when the data is sorted by date as they are not unique. The balance of the unique records must be sorted by date in ascending order
Your assistance will be most appreciated
Howard
The Problem that I am faced with, is that I may have a date 25/04/2007 with Control Number 8045 for say 1000.00. The customer may only pay on say 01/05/2007 on control number 8045.
I would like VBA code that will sort the data by Date, but also group all the control numbers together. In this example it will be as follows
Date Control Number Amount
25/04/2007 8045 1000.00
01/05/2007 8045 -800.00
I have attached sample file. In the sample file the CTL 8322 & 8722 must be grouped together when the data is sorted by date as they are not unique. The balance of the unique records must be sorted by date in ascending order
Your assistance will be most appreciated
Howard
Cash Sales.xls | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
4 | RefNo | JrnDate | Date | Ctl | Transamt. | balance | Ageing | ||
5 | A0001 | SVC15/06/07 | 15/06/2007 | 8322 | 1443.18 | 1443.18 | 41 | ||
6 | A0002 | SVC09/07/07 | 09/07/2007 | 8690 | 650.94 | 650.94 | 17 | ||
7 | A0003 | SVC10/07/07 | 10/07/2007 | 8722 | 6148.84 | ||||
8 | A0004 | REC11/07/07 | 11/07/2007 | 8711 | -188.1 | -188.1 | 15 | ||
9 | A0005 | GEN16/07/07 | 16/07/2007 | 8322 | -1080 | ||||
10 | A0006 | SVC17/07/07 | 17/07/2007 | 8840 | 1449.44 | 1449.44 | 9 | ||
11 | A0007 | SVC18/07/07 | 18/07/2007 | 8869 | 5229.12 | -403.81 | 8 | ||
12 | A0008 | SVC18/07/07 | 18/07/2007 | 8851 | 278.33 | 278.33 | 8 | ||
13 | A0009 | REC18/07/07 | 18/07/2007 | 8722 | -1500 | 4648.84 | 8 | ||
Sheet1 |