Group lines of data and subtotal
Two options come to mind:
1. Use jet to read in the data and use a query like "select sum(H) as
[mytotal] from [mytable] group by a, b, c, d, e, f, g"
2. Within Excel, keep an array of current values of a,b,c,d,e,f,g. If
any of the values change, dump out the value in the accumulator and
reset.
No sure if you need code. I am just typing as I am thinking.
Jenn
On Aug 25, 3:59*pm, Peruanos72
wrote:
I have multiple lines of data in columns A,B, C, D,E,F,G AND H where column H
contains a dollar value. The data in each column, except H is the same for
multiple rows and then the data in columns A,B, C, D,E,F,G changes. This
continues for multiple rows. What I need to do is somehow seperate the lines
of data into groups where the data in columns A,B, C, D,E,F,G are the same so
I can then subtotal column H for that group of data.
Example:
I need to subtotal the dollar value for ABC, HER and KLE
Note: The data will change from day to day so I can't simply search for a
particular value.
ABC * 2009040 780312737 * 8 * * WAFRIJEN * * * * 6/4/2009 * * * 204984337001 *$500.00
ABC * 2009040 780312737 * 8 * * WAFRIJEN * * * * 6/4/2009 * * * 204984337001 *$248.00
ABC * 2009040 780312737 * 8 * * WAFRIJEN * * * * 6/4/2009 * * * 204984337001 *$300.00
HER * 2009041 780748728 * 8 * * 522660V1 * 6/4/2009 *571201170018 *$5,896.00
HER * 2009041 780748728 * 8 * * 522660V1 * * * * 6/4/2009 * * * 571201170018 *$4,785.00
KLE * *2009042 780546059 * 8 * *3469-1-7 * * * * 6/2/2009 * * * 521779986001 *$4,456.00
KLE * *2009042 780546059 * 8 * *3469-1-7 * * * * 6/2/2009 * * * 521779986001 *$12,489.00
Thanks in advance!!
|