gregfthompson
asked on
Macro to sum excel
I have a very large spreadsheet containing 38,000 rows and 93 columns.
There are 2,600 sections within those 38,000 rows. These rows contain sections of up to 60 rows with the same identifying number in the first column. I need to have each of these sections summed by column for 93 columns and included in a new worksheet as a separate row.
Attached file contains full spreadsheet and example of second worksheet containing first three sections.
There are 2,600 sections within those 38,000 rows. These rows contain sections of up to 60 rows with the same identifying number in the first column. I need to have each of these sections summed by column for 93 columns and included in a new worksheet as a separate row.
Attached file contains full spreadsheet and example of second worksheet containing first three sections.
Enter this formula in D7 and then copy it down and across
=SUMIF('AUS CCD'!$A$7:$A$38703,'AUS POSTCODE'!$A7,'AUS CCD'!D$7:D$38703)
=SUMIF('AUS CCD'!$A$7:$A$38703,'AUS POSTCODE'!$A7,'AUS CCD'!D$7:D$38703)
ASKER
Thanks.
Looked good for the first three rows, but then all other rows showed zero.
The rest showed zero. What did I do wrong?
And I also need the first postcode and first postcode name in columns A and B in thw main worksheet to be copied into the second worksheet.
Thanks,
Greg
Looked good for the first three rows, but then all other rows showed zero.
The rest showed zero. What did I do wrong?
And I also need the first postcode and first postcode name in columns A and B in thw main worksheet to be copied into the second worksheet.
Thanks,
Greg
ASKER
Thanks I workd out the problem. Whens there's no postcode and there's nothing to relate to.
Can you provide a way to select first postcode and first postcode name in columns A and B in the main worksheet to be copied into the second worksheet?
Then your formula will work.
Thanks heaps,
Greg
Can you provide a way to select first postcode and first postcode name in columns A and B in the main worksheet to be copied into the second worksheet?
Then your formula will work.
Thanks heaps,
Greg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
THANK YOU!!
ASKER
PS: How can I filter the Postcode and Subname lists so there is a suburbname against the single postcode?
ASKER
PPS: Thanks I saw your final line -- all fixed . Thanks heaps again!!!
ASKER
EE-macro-required.zip