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