如果函数为假(如硬编码答案),我想将函数值作为粘贴特殊值返回。任何人都可以帮助我吗?我认为使用函数而不是 sub 更容易,因为我必须对相当大的数据集执行此操作。
Function produktion(d2, sum1, sum2)
Dim j As Integer
j = Application.Sum(sum1) - Application.Sum(sum2)
If d2 = Date Then
produktion = j
Else
'here hardcode the produktion = j forever like the paste special value
感谢您的时间!