Unable to set FormulaArray of Property Class - less than 255 characters

philk228

New Member
Joined
Jan 29, 2017
Messages
7
Hello,

I am trying to have the below code entered into Excel via VBA but am getting the "Unable to set the FormulaArray proprty of the range class" on the first line (and I'm assuming I'd continue to get this error on all the other subsequent array formula lines).

Any suggestions on how I might be able to amend the code so that the array formulas are populated into the ranges.
I am using the arrays as a multi-criteria vlookup. Not sure if there is another method might also work.

Code:
Range("B9").FormulaArray = "=IFERROR(INDEX(Data!A:AC,MATCH(1,(Data!H:H='Ticker Specific'!A9)*(Data!G:G='Ticker Specific'!$C$3),0),7),"")"
Range("B9:B33").FillDown
Range("C9").FormulaArray = "=IFERROR(INDEX(Data!A:AC,MATCH(1,(Data!H:H='Ticker Specific'!A9)*(Data!G:G='Ticker Specific'!$C$3),0),16),"")"
Range("C9:C33").FillDown
Range("D9").FormulaArray = "=IFERROR(INDEX(Data!A:AC,MATCH(1,(Data!H:H='Ticker Specific'!A9)*(Data!G:G='Ticker Specific'!$C$3),0),14),"")"
Range("D9:D33").FillDown
Range("E9").FormulaArray = "=IFERROR(INDEX(Data!A:AC,MATCH(1,(Data!H:H='Ticker Specific'!A9)*(Data!G:G='Ticker Specific'!$C$3),0),28),"")"
Range("E9:E33").FillDown
Range("F9").FormulaArray = "=IFERROR(INDEX(Data!A:AC,MATCH(1,(Data!H:H='Ticker Specific'!A9)*(Data!G:G='Ticker Specific'!$C$3),0),29),"")"
Range("F9:F33").FillDown




Range("I9").FormulaArray = "=IFERROR(INDEX(Data!A:AC,MATCH(1,(Data!I:I='Ticker Specific'!H9)*(Data!G:G='Ticker Specific'!$C$3),0),7),"")"
Range("I9:I33").FillDown
Range("J9").FormulaArray = "=IFERROR(INDEX(Data!A:AC,MATCH(1,(Data!I:I='Ticker Specific'!H9)*(Data!G:G='Ticker Specific'!$C$3),0),16),"")"
Range("J9:J33").FillDown
Range("K9").FormulaArray = "=IFERROR(INDEX(Data!A:AC,MATCH(1,(Data!I:I='Ticker Specific'!H9)*(Data!G:G='Ticker Specific'!$C$3),0),14),"")"
Range("K9:K33").FillDown
Range("L9").FormulaArray = "=IFERROR(INDEX(Data!A:AC,MATCH(1,(Data!I:I='Ticker Specific'!H9)*(Data!G:G='Ticker Specific'!$C$3),0),28),"")"
Range("L9:L33").FillDown
Range("M9").FormulaArray = "=IFERROR(INDEX(Data!A:AC,MATCH(1,(Data!I:I='Ticker Specific'!H9)*(Data!G:G='Ticker Specific'!$C$3),0),29),"")"
Range("M9:M33").FillDown
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
You need to double up on the quotes like
Code:
Range("B9").FormulaArray = "=IFERROR(INDEX(Data!A:AC,MATCH(1,(Data!H:H='Ticker Specific'!A9)*(Data!G:G='Ticker Specific'!$C$3),0),7),[COLOR=#ff0000]""""[/COLOR])"
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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