Darthrocket
New Member
- Joined
- Nov 12, 2016
- Messages
- 3
Hi Mr. Excel.
I am in the process of automating some stuff at work, and therefore I would like to sort some data with VBA, based on 3 criteria.
I would like so sort some data like seen below:
The way I am doing it now is like the following code:
However this is terribly inefficient, and takes forever to calculate.
Unfortunately my VBA skill are not good enough yet, to figure out a solution, so I hope that you can help me.
Thanks!
I am in the process of automating some stuff at work, and therefore I would like to sort some data with VBA, based on 3 criteria.
I would like so sort some data like seen below:

The way I am doing it now is like the following code:
Code:
Range("G7").Select
Selection.FormulaArray = "=INDEX($E$7:$E$" & LastRow & ",MATCH($G7&H$6&$G$6, $D$7:$D$" & LastRow & "&$B$7:$B$" & LastRow & "&$C$7:$C$" & LastRow & ",0))"
Selection.AutoFill Destination:=Range("G7:F" & LastRow2)
However this is terribly inefficient, and takes forever to calculate.
Unfortunately my VBA skill are not good enough yet, to figure out a solution, so I hope that you can help me.
Thanks!