vba and sumproduct
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA and Sumproduct

VBA and Sumproduct

resolvedResolved · Medium Priority · Version 2007

replyReply Tue 9 Aug 2011, 14:12Delegate Minnaar said...

Minnaar has attended:
Excel Advanced course
Excel VBA Intro Intermediate course

VBA and Sumproduct

I am using sumproduct to extract values from one table (called Table A) into another (called Master). There are 3 different criteria in 3 columns and date criteria in a single row. The sumproduct then gives the result for the cells in Table A that meet the 3criteria for each time period without any problem. This works fine for a small data set of about 20line items but with larger data sets of more than 300 line items it takes more than 15min to calculate. This is not practicable and I was wondering if the same could be done in VBA, vastly reducing calculation time and file size.

Example

Table A = source data:
Cond1 Cond2 Cond3 Period1 Period2 Period3 Period4
TV 23" Sony 1233 1000 3000 2550
TV 23" LG 1500 1400 2800 850
TV 23" HANNS 1000 2000 888 1500

Master = output:
Cond1 Cond2 Cond3 Period1 Period2 Period3 Period4
TV 23" Sony =value =value =value =value

where '=value is the sumproduct formula I use that is too slow for a large number of lines
My formula looks something like this: =SUMPRODUCT((Table A Cond1=Master Cond1)*(Table A Cond2=Master Cond2)*(Table A Cond3=Master Cond3)*(Table A Period 1 to 4=Master Period1),Table A source data values)

For upcoming training course dates see: Pricing & availability

replyReply Wed 17 Aug 2011, 13:20Trainer Jacob said...

RE: VBA and Sumproduct

Hi Minnaar

Thanks for your post. We have reviewed this and there may be a solution available but it is beyond the scope of this forum.

We would need to see your working files, then look at developing a solution, if we reach one we would let you know.

This approach is more consultative and involves setting aside specific time for one of our trainers to work on a solution.

There are associated rates for scoping a solution and where one is identified actually completing it.

If you would like to know more on this then please let me know.

Kind regards

Jacob

Wed 24 Aug 2011: Automatically marked as resolved.

 

Please browse our web site to find out more about
microsoft excel courses london and other Microsoft training courses.

Excel tip:

Filtering Data in an Excel 2010 Worksheet

When you have an Excel Worksheet with masses of data, it's not going to be easy to sift through it. So, in order to view sections of data, you can use the filter tool. Select the cells you want to filter (no need to select the column headers), then click the Home tab on the Ribbon, click Sort and Filter (you will find this in the Editing Section) then click Filter.

You will now see arrows in the top row of all the columns. If you click on an arrow, it will give you some filtering options so you can sort your data into ''Smallest to Largest'' or ''Oldest to Newest'' and so on..

To turn off the filtering, go back to the Home tab and click the Filter button again.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard