Summing Rows Using Macros

D

dtweah

Hi I am looking for a macro code that adds all rows with the same ID number,
creat a new row or column of sums while not adding the ID's and deletes all
previous rows so that I am only
left with the Previous ID and the sum figures in their respective
rows/columns. Please
see an example below. Thanks for any help.

Problem I have
ID Blah Blah1
2 5 2.5
2 6 3.5
2 7 4.5
2 8 5.5
3 9 6.5
3 10 7.5
3 11 8.5
3 12 9.5
3 13 10.5
4 14 11.5
4 15 12.5
4 16 13.5
4 17 14.5

Solution I want
ID Blah Blah1
2 26 16
3 55 42.5
4 62 52
 
S

Steve Schapel

Dtweah,

Are you using Microsoft Access? This is not really a database task, it is
almost more like the kind of thing you might do in a spreadsheet, which
makes me wonder whether you are talking about another programme. If so, you
will have a better chance of a good answer in a newsgroup dedicated to the
software you are using e.g. Excel.
 
D

dtweah

I am using Microsoft Excel and have 80,000 rows of data. Need an excel macro
code to do this for me. Thanks
 
S

Steve Schapel

Dtweah,

Ah! Well, the focus of this newsgroup is Macros in Access, the database
programme. Macros in Access do not resemble macros in Excel. As I
indicated in my earlier reply, you will have a better chance of a good
answer if you re-post to an Excel newsgroup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top