Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

sorting and summing large

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Sorting and summing large amounts of data

Sorting and summing large amounts of data

ResolvedVersion 2007

Tracey has attended:
Excel VBA Intro Intermediate course

Sorting and summing large amounts of data

I have a data download from a .sql database to Excel. I have written code to refresh this, and it populates an Excel worksheet. I need to sum this data so that drivers (eg alpha-numeric nominal codes) appear once, and another column is summed if a third column meets certain criteria.

Eg - I may have 25 transactions appearing for nominal code 1234abc, 36 transactions for nominal code 4567def.

I want 1234 in one column, abc in another column, 4567 in the first column a row below 1234 and def in the second column a row below abc. I then want to sum whichever of the 25 transactions (column f - column g in my base data sheet) for 1234abc have occurred in an accounting period <=x (column h in my base data sheet), and ditto for each nominal code occurring in my base data sheet. I then want to return these summed amounts in column 'c' of my reporting sheet, against the corresponding nominal code. I have been told that the best way to do this is to use an ADO connection and create a data set in memory. As I am working within one sheet, is this really necessary?

RE: Sorting and summing large amounts of data

Hi Tracey

Thanks for your question

This is hard to answer without seeing the actual file. Could you email me an example (with dummy data if necessary) and then I can get back to you

my email is sw@stl-training.co.uk

Regards

Stephen

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

How to Spell Check an Excel 2010 Worksheet

Excel 2010 does not automatically spell check a document. So, here's how to manually spell check a worksheet.

Either select the ''Review'' tab in the Ribbon, go to the ''Proofing'' section and click ''Spelling.'' Or, simply press F7.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.