Array error

C

Craig

I have a problem with the following lines in my Macro:


Range("c2").Select
Selection.FormulaArray = _
"=SUM(IF(jobno,RC[-2],IF(Dept=$R$1C,IF(Sun=""Not"",IF(Status<>""No
Charge"",Ratecard,0),0),0)))"

jobno, Dept, Sun, Status and Ratecard are range names (and are all of equal
length, so that is not my problem).

I get the following error message : Run-time error'1004' Unable to set the
FormulaArray property of the range class.

I am using Excel 2002 SP3.

Thanks in advance

Craig
 
B

Bob Phillips

Try

Range("c2").Select
Selection.FormulaArray = _
"=SUM(IF(jobno,RC[-2],IF(Dept=R1C,IF(Sun=""Not"",IF(Status<>""No
Charge"",Ratecard,0),0),0)))"
 
C

Craig

Thanks Bob.


Bob Phillips said:
Try

Range("c2").Select
Selection.FormulaArray = _
"=SUM(IF(jobno,RC[-2],IF(Dept=R1C,IF(Sun=""Not"",IF(Status<>""No
Charge"",Ratecard,0),0),0)))"

--
HTH

Bob Phillips

Craig said:
I have a problem with the following lines in my Macro:


Range("c2").Select
Selection.FormulaArray = _

"=SUM(IF(jobno,RC[-2],IF(Dept=$R$1C,IF(Sun=""Not"",IF(Status<>""No
Charge"",Ratecard,0),0),0)))"

jobno, Dept, Sun, Status and Ratecard are range names (and are all of equal
length, so that is not my problem).

I get the following error message : Run-time error'1004' Unable to set
the
FormulaArray property of the range class.

I am using Excel 2002 SP3.

Thanks in advance

Craig
 

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