Insert an advanced formula into a cell

2019-09-13 01:34发布

Using Excel 2016 I am struggling to get a formula pasted into a cell with VBA (where the VBA does a data import). I have two sheets: Rapport SNN and Data.

Sheets("Rapport SNN").[E4].Formula = "=SUMIFS(Data!S2:Data!S2000;Data!V2:Data!V2000;""BankAxept"";Data!M2:Data!M2000;C4)/100"

Just throws me a:

Run-time error '1004': Application-defined or object-defined error.

What do I do wrong?

1条回答
男人必须洒脱
2楼-- · 2019-09-13 02:02

You have semicolons when they should be commas.

WorkSheets("Rapport SNN").[E4].Formula = "=SUMIFS(Data!S2:Data!S2000,Data!V2:Data!V2000,""BankAxept"",Data!M2:Data!M2000,C4)/100"
查看更多
登录 后发表回答