I have a file produced from a SQL query which has a volatile number of rows each day. On of the columns is the sortkey which tells the query uses to list the data in the right order. I am now being asked to group the data in each category. My thought is the easiest way to do this is to use the sortkey column, but since the number of rows changes daily, I need a macro that will allow for the varying row numbers.
Below is a list of the values in that sortkey column. The first 3 numbers designate the category and the last 2 would be the subcategories that need to be grouped. So with the values below, 40300 would be the category header, while 40301, 40303, 40306, 40308, 40309, 40310, 40312 would be the subcategories.
<colgroup><col></colgroup><tbody>
</tbody>
How can I write code that will cycle through this column and set up the grouping?
Thanks.
Below is a list of the values in that sortkey column. The first 3 numbers designate the category and the last 2 would be the subcategories that need to be grouped. So with the values below, 40300 would be the category header, while 40301, 40303, 40306, 40308, 40309, 40310, 40312 would be the subcategories.
40100 |
40200 |
40300 |
40301 |
40303 |
40306 |
40308 |
40309 |
40310 |
40312 |
40400 |
40402 |
40500 |
40501 |
40503 |
40506 |
40508 |
40509 |
40512 |
<colgroup><col></colgroup><tbody>
</tbody>
How can I write code that will cycle through this column and set up the grouping?
Thanks.