Index Match VBA XL Down

jamesmev

Board Regular
Joined
Apr 9, 2015
Messages
233
Office Version
  1. 365
Platform
  1. Windows
I am using the below VBA
VBA Code:
Sub IMBRAND()
    Dim J_J As Long

J_J = Range("A" & Rows.Count).End(xlUp).Row
    Range("J2").Formula = "=IFERROR(INDEX(MatVariable!C[-6],MATCH([@PS],MatVariable!C[-8],FALSE)),"""")"
    Range("J2").AutoFill Destination:=Range("J2:J" & J_J), Type:=xlFillSeries
    ActiveSheet.Calculate
    Columns("J:J").Copy
    Columns("J:J").PasteSpecial Paste:=xlPasteValues

End Sub
To do an Index Match on Column J to a table within MatVariable (Column C).
When executing the code I am getting a run time 1004 error. Unsure where the break is.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
You need to use Formula R1C1 rather than Formula
 
Upvote 0

Forum statistics

Threads
1,214,787
Messages
6,121,565
Members
449,038
Latest member
Guest1337

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