In this article, you will learn how to use INDEX & MATCH function in VBA to match 2 criteria’s in excel using VBA code.
To get the output we will use combination of OFFSET & COUNTA functions to create Name Manager list.
Let us understand with an example:
We need to follow the below steps to launch VB editor
This will create new module.
Enter the following code in the Module
myName = [F2]
mySubject = [G2]
mark = Application.WorksheetFunction.Index([StMark], _
Application.WorksheetFunction.Match(myName, ([StName]), 0) + _
Application.WorksheetFunction.Match(mySubject, [StSubject], 0) – 1)
[H2] = mark
This is how we can get results using Index Match worksheet function in VBA.
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.