vba and sumproduct
RH

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

VBA and Sumproduct

resolvedResolved · Medium Priority · Version 2007

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)

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.

 

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:

Paste a web address into the hyperlink address field

If you copy a web address the only way to paste into the address field of the hyperlink box is to use CTRL + V. Right click paste does not work.

View all Excel hints and tips


Server loaded in 0.05 secs.