INDEX/MATCH Array Formula within VBA Code


Hi, I need to use INDEX/MATCH Array Formula within VBA to lookup a date value that can be between two dates (FROM and TO). The following formula works fine in an Excel spreadsheet but I need to do it within my VBA code.

{=INDEX($C$3:$C$7,MATCH(1,IF($A$3:$A$7 <= E4,IF($B$3:$B$7 >= E4,1)),0))}

Thanks for your help.



Your request amounts to an instruction to the motor mechanic to repair the engine using a screw driver. Worksheet functions are one tool, VBA is another. If you want the mechanic to repair the engine, describe what's wrong and leave the choice of tools to him. If you want the repair done using VBA don't instruct to use worksheet functions. You need to post your workbook and your code. 
Variatus (rep: 3958) Feb 22, '19 at 6:45 am
Add to Discussion

Answer the Question

You must create an account to use the forum. Create an Account or Login