VBA Index/Match in a Loop

pras2012

New Member
Joined
May 23, 2018
Messages
1
HI all,

am new to VBA excel.
some
i am trying to use the macro for index match but some am not able to get the that .

am using the below formaula .
={INDEX(Sheet2!P:P,MATCH(Sheet1!A2&Sheet1!$O$1,Sheet2!A:A&Sheet2!E:E,0))}

Note: Sheet1!$O$1 is constant criteria

Please help me with this
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
What exactly do you mean by "but some am not able to get the that"?
The formula goes in the cell fine for me :confused:

Code:
Sub Test4()
Sheets("Sheet1").Range("C1").FormulaArray = _
        "=INDEX(Sheet2!P:P,MATCH(Sheet1!A2&Sheet1!$O$1,Sheet2!A:A&Sheet2!E:E,0))"
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,996
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top