Hi everyone.
I am very new to scripting, and I need some help creating a vb script ( macro ) that does the following in Excel 2003.
Basically, I'll have 4 Columns, say A B C and D. A B and C are ID's lets say, and column D is a dollar value. Some rows will be the same ( their A B C values ) , and some rows will have differing values.
I need to have some type of loop that takes the first row, copies it somewhere ( same worksheet or a different, new one ) and then takes its dollar value ( column D ), and saves it, and then loops to the next row, and if the ABC values are the SAME, it ADDS to the dollar value, and then goes on. And then, once it goes through all of the rows, it goes to the next row and does the same thing. However, I need it so that the final output has only ONE copy of the identical ABC rows and its SUMMED dollar value.
So if there are 10 rows, and there are 2 sets of 5 identical rows, the final report or worksheet or whatever would only have 2 A B C colums and only 2 Dollar totals.
I hope I explained it as best I can. It seems to be a small If statement but i have never programmed and am lost. Any help is appreciated.
Thanks in Advance!
-Marv
Bookmarks