Automating copy and paste of subtotals to new sheet

  • Thread starter Thread starter ft88plc
  • Start date Start date
F

ft88plc

Hi everyone,

Have about 240,000 lines of CSV. Column A can have duplicates and is
the key. Can import about 65,000 rows at a time into excel, to deal
with the maximum # of rows, but if I try to subtotal then it breaks the
limit.

What I want to accomplish is:

All rows are sorted by Column A first.

For each set of rows with the same values in column A, sum columns D,
E, F, G, H, I, J. Then take the value in column A and the subtotals
above, and populate a single row on a new sheet with these values .
Then repeat the exercise, starting with the first row that contains a
different value in Column A.

This way I hope to accomplish getting round the ~65,000 row limit
described above. My VBA knowledge is a bit sparse and I am having
difficulty especially with the row and cell selection within the
conditional loop. Any help would be appreciated.

Thanks in advance,

Paul
London
 
You can get a list of unique values in column A by using Data|Filter|Advanced
Filter (unique recodes only checked).

Debra Dalgleish has some pictures at:
http://www.contextures.com/xladvfilter01.html#FilterUR

Then you could use =sumif()'s to determine the totals:
=SUMIF(Sheet1!$A$1:$A$999,A2,Sheet1!$B$1:$B999)

Ajust your ranges accordingly.
 

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

Back
Top