Unable to set FormulaArray property in VBA

M

MJP

I'm trying to write a VBA routine to populate certain cells with an array
formula.

The formula basically tries to match the current column header, current row
label and worksheet name with any values in another workbook where the name,
date, and worktype match. The array formula works fine if I key it into the
cell & do CTRL, SHIFT ENTER.

However, if I try to do this in VBA, via
Range(cells(r,c),cells(r,c)).formula.array = "...." then I keep getting the
following message :

Unable to set the FormulaArray property of the Range class

I've tried changing the range to Cells(r,c); or Range("B1") but neither of
these work either.

I've checked several newsgroup posts on this topic and they seem to suggest
my code should work - where am I going wrong?

Thanks in advance,

Mitch
 
B

Bob Umlas

1 - you used formula.array where it should be formulaarray (no ".")
2 - it would help if you supplied what's going into the "..." part of your
message --
otherwise, it works fine for me!

Bob Umlas
Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top