In that case, if calculation is slow, then this might help to speed it up.
In P3 and filled down to create a reference to the database row that the item code matches. Adjust the refernce to $A$5000 so that it is adequate for the size of the database.
Formula:
=MATCH($L3,$A$1:$A5000,0)
Then to get the applicable price
Formula:
=AGGREGATE(14,4,(INDEX($H:$J,$P3,0)<>"")*(INDEX($H:$J,$P3,0)<$M3)*(INDEX($E:$G,$P3,0)=$O3)*INDEX($B:$D,$P3,0),1)
This method means that the array is only processing the 1 row in the database where the item matches, not all 5k rows.
Bookmarks