使用WKS IF功能清除单元格内容

时间:2017-05-25 13:42:15

标签: excel excel-vba excel-formula vba

首先,我必须承认,我不是VBA程序员。我正在构建一个电子表格并使用Record Macros生成VBA来执行一些自动化任务 我想在Excel 2016中使用“填充和填充”功能,(我知道此功能可用于Get / Transform,但我想用VBA宏执行此操作)。

我的问题是填充/填充不起作用,因为它正在寻找一个空白单元格,因此光标跳转到表格中列的底部而不填写任何值。注意,我已填写值0,因此我可以测试此值,然后清除单元格内容。

我想使用If函数语句来清除单元格,因此填充/缩小将起作用:if(a1 = 0,clear,a1)

我知道语法不正确,但你可以建议我可以用函数做这样的事情吗?

enter image description here

enter image description here

enter image description here enter image description here

enter image description here enter image description here

0 个答案:

没有答案