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

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,226,729
Messages
6,192,696
Members
453,747
Latest member
tylerhyatt04

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