Hello all,
New to the thread so I do apologies if this isn't sufficient.
I am trying to create VBA code for Index Match Match with a loop.
I have attached an image to help.
To detail the problem;
- Cells A4:C13 have permutations from myarray (1,2,3,4,7) where I want 3 numbers picked and no repeats eg 1,2,3 | 1,2,4 | etc... (macro already created).
- I have data in cells G4:L8 which gives each point (1,2,3,4,7) values based upon specific dates (3/1/22 - 6/1/22)
- I want to create VBA code which will use each permutation and multiply the 3 points together for each date
I can use INDEX MATCH MATCH to do this with the formula being:
=INDEX($H$5:$L$8,MATCH($O16,$G$5:$G$8,0),MATCH(P$13,$H$4:$L$4,0))*INDEX($H$5:$L$8,MATCH($O16,$G$5:$G$8,0),MATCH(Q$13,$H$4:$L$4,0))*INDEX($H$5:$L$8,MATCH($O16,$G$5:$G$8,0),MATCH(R$13,$H$4:$L$4,0))
But how do I use VBA to do this INDEX MATCH MATCH and Loop through all permutations and dates please?
Thank you very much for your help in advance and time.
New to the thread so I do apologies if this isn't sufficient.
I am trying to create VBA code for Index Match Match with a loop.
I have attached an image to help.
To detail the problem;
- Cells A4:C13 have permutations from myarray (1,2,3,4,7) where I want 3 numbers picked and no repeats eg 1,2,3 | 1,2,4 | etc... (macro already created).
- I have data in cells G4:L8 which gives each point (1,2,3,4,7) values based upon specific dates (3/1/22 - 6/1/22)
- I want to create VBA code which will use each permutation and multiply the 3 points together for each date
I can use INDEX MATCH MATCH to do this with the formula being:
=INDEX($H$5:$L$8,MATCH($O16,$G$5:$G$8,0),MATCH(P$13,$H$4:$L$4,0))*INDEX($H$5:$L$8,MATCH($O16,$G$5:$G$8,0),MATCH(Q$13,$H$4:$L$4,0))*INDEX($H$5:$L$8,MATCH($O16,$G$5:$G$8,0),MATCH(R$13,$H$4:$L$4,0))
But how do I use VBA to do this INDEX MATCH MATCH and Loop through all permutations and dates please?
Thank you very much for your help in advance and time.