将高级公式插入到单元格中 [英] Insert an advanced formula into a cell

查看:113
本文介绍了将高级公式插入到单元格中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Excel 2016我很难使用VBA(VBA进行数据导入)将公式粘贴到单元格中。我有两张表: Rapport SNN 数据

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"

只是给我一个:


运行时错误'1004':应用程序定义或对象定义的错误。

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

我做错了什么?

推荐答案

你的分号应该是逗号。 / P>

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"

这篇关于将高级公式插入到单元格中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆