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