Putting Index Match Array in VBA

stlpony

New Member
Joined
Mar 8, 2018
Messages
39
Hello!

Goal: Run an index match down the data in column #54 , based on the info in cell $A$2 and cell $A7.

1) I'm having trouble getting the VBA coding to reference the tab name that I'm working on without manually typing it in the coding. I'll need to run this macro on many different tabs.
2) How do I get the macro to do the CTRL+Shift+Enter for each cell?
3) I want A2 fixed in the formula, but I need A7 to go down as many rows as needed


Range(Cells(6, 54), Cells(LastRow, 54)).Formula = "=INDEX(BackData!$A$1:$G$90000,MATCH(ActiveSheet.Name!$A$2&ActiveSheet.Name!A7,BackData!$D$1:$D$90000&BackData!$B$1:$B$90000,0),3)"

Thanks!!
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,215,740
Messages
6,126,582
Members
449,319
Latest member
iaincmac

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