I have the following array formula entered into a cell in excel which works fine to lookup on multiple criteria and return the relevent value
However, the calc/recalc time is far too slow for the number of rows I need to use this
Instead I need to replicate with VBA. Can anyone give me any pointers on how to achieve this with reletively short code?
An example of the data I need to look up is
Many thanks
Os
Code:
{ =INDEX('ELR Lookup'!d$2:d$1477,MATCH(H100,IF(O100>='ELR Lookup'!b$2:b$1477,IF(P100<='ELR Lookup'!c$2:c$1477,IF(H100='ELR Lookup'!A$2:A$1477,'ELR Lookup'!A$2:A$1477),0)))) }
However, the calc/recalc time is far too slow for the number of rows I need to use this
Instead I need to replicate with VBA. Can anyone give me any pointers on how to achieve this with reletively short code?
An example of the data I need to look up is
Code:
Main Sheet
Cell a100 = BJW3
Cell b100 = 17
cell c100 = 18
Cell D should return "Secondary" - (ie colA =BJW3, colC <=17, colC >=18)
ELR Lookup Sheet:
col A col B col C col D
BJW1 0.0013 0.142 Secondary
BJW2 5.091 6.1736 Secondary
BJW3 12.109 16.1254 Primary
BJW3 16.1254 18.0132 Secondary
BJW3 18.0132 19 Primary
BJW3 19 23.0733 Primary
BKE 36.0369 37.1364 Primary
Many thanks
Os